iptables and multiple IP adresses on intermet.
Hi!
My isp provides me with 4 static external ip addresses. I am trying to set up a router using iptables. I have 2 nics (1 internal and 1 external) eth0 is external EXTIP1 eth0:1 is EXTIP2 eth0:2 is EXTIP3 eth0:3 is EXTIP4 eth1 is internal INTIP 192.168.0.1 By default i want it to rout all outgoing traffic (internal comunicting out) to route as EXTIP1. And i also want some computers to be routerd as EXTIP2.EXTIP3..... My problem is that iptables doesn't support IP alias. I could solve this by buying 3 more NICs and a new switch, but that would be a little expensive. And i want for example port 22 on EXTIP1 to be forwarded to 192.168.0.2. port 22 on EXTIP2 shall be forwarded to 192.168.0.3 After searching the net i have found out that it's possible but i didn't find out how to do it. Please help. /Regards Niklas Lönn |
you should be able to achieve this using DNAT
Check www.netfilter.org documentation for more details. |
how would that solve the ip alias problem?
/niklas |
|
All times are GMT -5. The time now is 10:55 AM. |