© 2009 Cypress Solutions
Complete Manual: CTM-15X Firmware 1.2.0
(Revision 1.0)
39
6BCommand Reference
cmd factory
OK
return to list of commands
firewall n eeeee lllll t iii.iii.iii.iii s
This command is used to setup the port forwarding configuration of the modem.
Up to 10 port forwarding configurations can be set.
The local IP address will default to 192.168.1.X, where X is extracted from iii.iii.iii.iii and 192.168.1 is
extracted from the IP address in the LAN Configuration setting.
n = 1 to 10
port forwarding number
eeeee = 0 to 65535
external port number to forward to
lllll = 0 to 65535
local port number to forward to
t = 0
disable
t = 1
UDP
t = 2
TCP
t = 3
both UDP and TCP
iii.iii.iii.iii = 0.0.0.0 to 255.255.255.255
local IP address to forward to
s = 0
disable forwarding
s = 1
enable forwarding
The current port forward settings can be queried by using firewall without parameters.
Note that LAN IP addresses used in port forwarding rules must match the LAN subnet as configured using
lanip, lannetmask, and lanrepip.
Examples:
1. Set port forwarding #1 to forward data destined for port 8080 (same external & local port number), on
both using UDP and TCP protocol to IP 192.168.1.20 and enabled
cmd firewall 1 8080 8080 3 192.168.1.20 1
OK
2. Set port forwarding #2 to forward data destined for external port 42375 and redirect it to local port
5001, on UDP protocol to IP 192.168.1.20 and enabled.
cmd firewall 2 42375 5001 1 192.168.1.20 1
OK
3. Query the current firewall configuration
cmd firewall
cmd firewall 1 8080 8080 3 192.168.1.20 1
OK