Portal Home > Knowledgebase > Articles Database > Iptables forwarding
Iptables forwarding
Posted by chaotix, 11-24-2010, 06:28 AM |
Hello,
I hope this is the right section (if not mods please move), I want to connect 2 networks, connected to my CentOS Server.
I have a server which needs to connect to the other network. (EXAMPLE)
Two Networks:
192.168.168.0
192.168.169.0
IPs:
192.168.168.1
192.168.169.1
Server1 has both IPs 192.168.168.1 and 192.168.169.1 when the server1 needs to connect to 192.168.169.169 it should route the traffic through 192.168.169.1 IP.
I hope this makes sense, I think what I need to do is route traffic using IPtables forwarding but I'm not as experienced with this, please let me know.
Thanks.
|
Posted by fabin, 11-24-2010, 06:35 AM |
Traffic cannot be routed through an IP
It can be routed through a gateway or an interface.
|
Posted by drspliff, 11-24-2010, 06:36 AM |
um... no - just provide correct netmasks for either interfaces, e.g. eth0 as 192.168.169.1/24 and eth1 as 192.168.168.1/24 and the routing table will handle the rest.
|
Posted by chaotix, 11-24-2010, 07:55 AM |
Whats the command?
Thanks.
|
Posted by drspliff, 11-24-2010, 08:12 AM |
Use whatever you used previously to configure your two interfaces, e.g. /etc/network/interfaces in Debian.
|
Add to Favourites Print this Article
Also Read
Jonesolutions (Views: 784)