Linux-Noob Forums

Full Version: port forwarding in lan
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

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 ?


Quote:how i can do that ?
 

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