Settings for xp firewall under cmd

  
        There are many functions that can be implemented under cmd, including the operation of the registry. However, there are more achievable features that you haven't found yet. Here are some of the cmd configurations that implement xp's own firewall. The commands under cmd are roughly divided into three types: network detection (such as ping) and network connection (such as telnet). ) and network configuration (such as netsh). What we are going to say now is to do it through netsh. Because the firewall is also part of the network configuration.



Type netsh under cmd, netsh> is proved to be successful. If you are using this command for the first time, you can type help to see what commands are there;

netsh>help



The following commands are valid:



Commands in this context:

.. - Move to the previous context level.

? - Display a list of commands.

abort - Discards changes made in offline mode.

add - Add a configuration item to the project list.

alias - Add an alias

bridge - Change to the `netsh bridge' context.

bye - Exit the program.

commit - Submit changes made in offline mode.

delete - Delete a configuration item on the project list.

diag - Change to the `netsh diag' context.

dump - displays a configuration script.

exec - Run a script file.

exit - Exit the program.

firewall - Change to the `netsh firewall' context.

help - Displays a list of commands.

interface - Change to the `netsh interface' context.

offline - Set the current mode to offline.

online - Set the current mode to online.

popd - Open a context from the stack.

pushd - Push the current context onto the stack.

quit - Exit the program.

ras - Change to the `netsh ras' context.

routing - Change to the `netsh routing' context.

set - Update configuration settings.

show - Display information

unalias - Delete an alias.

winsock - Change to the `netsh winsock' context.



The following sub-contexts are available:

bridge diag firewall interface ras routing winsock



The explanations followed by these commands have been I understand it very well, I will not say more. You can see the firewall command. Type firewall. The prompt becomes netsh firewall>, continue typing help and see what commands are under the firewall.

netsh firewall>help



The following commands are valid:



The command inherits from the netsh context:

.. - Move to the previous level of context.

abort - Discards changes made in offline mode.

add - Add a configuration item to the project list.

alias - Add an alias

bridge - Change to the `netsh bridge' context.

bye - Exit the program.

commit - Submit changes made in offline mode.

delete - Delete a configuration item on the project list.

diag - Change to the `netsh diag' context.

exit - Exit the program.

firewall - Change to the `netsh firewall' context.

interface - Change to the `netsh interface' context.

offline - Set the current mode to offline.

online - Set the current mode to online.

popd - Open a context from the stack.

pushd - Push the current context onto the stack.

quit - Exit the program.

ras - Change to the `netsh ras' context.

routing - Change to the `netsh routing' context.

set - Update configuration settings.

show - Display information

unalias - Delete an alias.

winsock - Change to the `netsh winsock' context.



Commands in this context:

? - Display a list of commands.

add - Add a firewall configuration.

delete - Delete the firewall configuration.

dump - displays a configuration script.

help - Displays a list of commands.

reset - Resets the firewall configuration to its default value.

set - Set the firewall configuration.

show - Displays the firewall configuration.



fact, many commands are inherited from the top down, but we use is "in this context command"

add, delete, show, set, etc. Etc.

See how these commands are used.

1 add Type add to see the following prompt:

netsh firewall>add



The following commands are valid:

The

command inherits from the netsh context:

add helper - installs a helper DLL.



Commands in this context:

add allowedprogram - Add the program configuration allowed by the firewall.

add portopening - Add firewall port configuration.



If you want the firewall to allow the port to add, that is, add portopening, add the firewall to allow the program does is add

allowedprogram up. These two I want to be the most important in our invasion process. This way we can configure the firewall on the command line to make our specific ports and programs available. Let's take a look at how it is used.

Type add allowed program. You will be prompted that the command is incorrect, and then the correct usage of the command appears below.



netsh firewall>add allowedprogram

The syntax provided by this command is incorrect. Please check the help for the correct syntax information.



add allowedprogram



[ program = ] path

[ name = ] name

[ [ ,null,null,3],Mode = ] ENABLE
Copyright © Windows knowledge All Rights Reserved