Linux-Noob Forums
port forwarding in lan - Printable Version

+- Linux-Noob Forums (https://www.linux-noob.com/forums)
+-- Forum: Linux Noob (https://www.linux-noob.com/forums/forum-3.html)
+--- Forum: Network Problems (https://www.linux-noob.com/forums/forum-58.html)
+--- Thread: port forwarding in lan (/thread-2013.html)



port forwarding in lan - wizzard - 2006-04-26


i have a linux server with 2 interfaces eth0 wan interface and eth1 lan interface

 

in lan i have 192.168.1.0/24 and the ip for eth1 is 192.168.1.1

 

i want that all trafic from lan which came on eth1 on port 21 to be redirected in lan on another ip lets say 192.168.1.2 port 21

 

if 192.168.1.4 want to acces 192.168.1.1 on port 21 (ftp) that request to te redirected on 192.168.1.2 port 21

 

 

how i can do that ?




port forwarding in lan - znx - 2006-05-21


Quote:how i can do that ?
 

ok .. thats completely possible with iptables .. which can forward it all on :)this gives a quick example