Reference Guide 778 Document #: LTRT-17939
Mediant MSBR
76.7 NAT Commands
The following describes NAT commands.
76.7.1 ip nat inside source static
NAT port-forwarding exposes a LAN service (IP address and port) to WAN users. The
command creates a static translation rule, which maps a WAN port (on one or all WAN
interfaces) to a LAN service.
To remove a port-forwarding rule, use the no format of the command.
Syntax
ip nat inside source static {tcp|udp} <lan-ip> <lan-port> <wan-ip>
<wan-port>
ip nat inside source static {tcp|udp} <lan-ip> <lan-port> <wan-ip>
range <wan-port-start> <wan-port-end>
ip nat inside source static {tcp|udp} <lan-ip> <lan-port> <if-
name> <wan-port>
ip nat inside source static {tcp|udp} <lan-ip> <lan-port> <if-
name> range <wan-port-start> <wan-port-end>
ip nat inside source static {tcp|udp} <lan-ip> same <wan-ip> <wan-
port>
ip nat inside source static {tcp|udp} <lan-ip> same <wan-ip> range
<wan-port-start> <wan-port-end>
ip nat inside source static {tcp|udp} <lan-ip> same <if-name>
<wan-port>
ip nat inside source static {tcp|udp} <lan-ip> same <if-name>
range <wan-port-start> <wan-port-end>
ip nat inside source static ip <lan-ip> <wan-ip>
ip nat inside source static ip <lan-ip> <if-name>
ip nat inside source static gre <lan-ip> <wan-ip>
ip nat inside source static {tcp|udp} <lan-ip> <lan-port> <wan-ip>
<wan-port> same <if-name> <wan-port> match <access list name>
Command Description
tcp Defines forwarding for a TCP port.
udp Defines forwarding for a UDP port.
lan-ip Defines the IP address of LAN service host.
same Sets the LAN port the same as the WAN port.
lan-port Defines the port number (1-65535) of the LAN service.
match Applies an access list rule to the NAT port forwarding rule. For
configuring access list (ACL), use the command:
(config-data)# access-list
wan-ip
Defines the WAN interface for this rule. Specify the IP address
or 0.0.0.0 for all WAN interfaces.
wan-port Defines the port number on WAN interface.