Port Forwarding
Port forwarding for home users is needed if they have some server or service running on their PC that others on the internet need to access (gaming server for example).
File you need to edit is /etc/config/firewall and for reference also check out /etc/config/firewall#forwarding.ports.destination.natdnat
What most of people want is just to forward some specific port from router to some other machine, and that is done simply adding new redirect rules to your /etc/config/firewall or /etc/firewall.user files.
config 'redirect'
option 'name' 'some awesome game'
option 'src' 'wan'
option 'proto' 'tcpudp'
option 'src_dport' '2222'
option 'dest_ip' '192.168.1.100'
option 'target' 'DNAT'
option 'dest' 'lan'
Or if you wan't to hide on which port is your service running for security reasons you can redirect port 5555 to port 22 on your linux server running ssh
config 'redirect'
option 'name' 'ssh'
option 'src' 'wan'
option 'proto' 'tcpudp'
option 'src_dport' '5555'
option 'dest_ip' '192.168.1.100'
option 'dest_port' '22'
option 'target' 'DNAT'
option 'dest' 'lan'
To make the changes active, run /etc/init.d/firewall restart.
doc/howto/port.forwarding.txt · Last modified: 2013/04/23 01:25 by xerces8
This text is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
