Information Technology Reference
In-Depth Information
For example, to configure an interface on Local Area Connection #2 to provide both
address and port translation with firewall capabilities, run the following command:
> netsh routing ip nat add interface "Local Area Connection #2" fullfirewall
Second, to map a public address to a private address in the NAT address pool, use this
command:
> netsh routing ip nat add addressmapping [InterfaceName=] <InterfaceName>
[public=] <IPAddress> [private=] <IPAddress>
[inboundsessions=]{enable | disable}
The command-line options are as follows:
InterfaceName : Required parameter whose value specifies the interface on which you want
to configure NAT. The value must match the name of the interface as it has been specified
in Network Connections. Put the value in quotation marks if there are spaces in the name.
Public : Required parameter whose value specifies the public IP address of the interface.
Private : Required parameter whose value specifies the private IP address to which you
want to map the public address.
InboundSessions : Required parameter whose value specifies whether to allow or prohibit
inbound requests. The two possible values are enable (permit inbound requests) and
disable (prohibit inbound requests).
For example, to map the public IP address of 209.132.64.128 to the private address of
192.168.30.2 on Local Area Connection #2 , but to prohibit inbound requests on the interface,
run the following command:
> netsh routing ip nat add addressmapping
"Local Area Connection #2" 209.132.64.128 192.168.30.2 disable
Third, to add an address range to address pool for the specified NAT interface, use this
command:
> netsh routing ip nat add addressrange [InterfaceName=] InterfaceName
[start=]<IPAddress> [end=]<IPAddress> [mask=]<SubnetMask>
The command-line options are as follows:
InterfaceName : Required parameter whose value specifies the interface on which you want
to configure NAT. The value must match the name of the interface as it has been specified
in Network Connections. Put the value in quotation marks if there are spaces in the name.
Start : Required parameter whose value specifies the first IP address in the range.
End : Required parameter whose value specifies the final IP address in the range.
Mask : Required parameter whose value specifies the subnet mask of the range.
For example, to add the range 10.10.10.1 through 10.10.10.254 to the Local Area
Connection #2 interface using a subnet mask of 255.255.255.0 , run the following command:
Search WWH ::




Custom Search