virtual interfaces
Hey Askar,
Thanks for your reply. What i wanted to do was to have 2 web servers having private IPs( Ex:
192.168.128.5 and 192.168.128.6 on the 255.255.255.0 subnet). The hub connecting these machines would be connected to my Linux firewall machine. In other words the private IPs are the ones that make my DMZ, I shall call this interface which is connected to the DMZ as eth1.
What i want to do is redirect all requests to 64.24.12.45 to 192.168.128.5 and 64.24.12.46 to 192.168.128.6 at the moment i have no problem in doing the natting and everything related to send/receive from the 64.24.12.45.
What i thought was to have a virtual interface and bind the other internet routable address to it, ex eth0:0. What are my options?
Also how could i do the POSTROUTING SNAT if I cannot use virtual in terfaces?
Pls help ASAP.
Pretty tight siu here.
TIA
Quoted 16 lines · --- Askar Ali Khan
Hi TIA
Nope no virtual interfaces support in netfilter rules :), here what is
the reply from Antony Stone to me when i got the same problem :)"Secondly, netfilter doesn't allow things like eth0:1 (it won't accept the
colon), so all you do is use the normal interface
name (eth0). It's the
asme physical interface anyway, and this will do what you want - you can use
-i eth0 and -o eth0 to match packets coming in or going out on eth0:1"
Quoted 21 lines
Regards
AskarQuoted 15 lines · ip tables
Hi gurus,
Does iptables support rules written with virtual interfaces such as eth0:0 for all input,output and forward chains?. Pls help urgent requirement!!
TIA
__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail
Quoted 7 lines
What i thought was to have a virtual interface and bind the other internet routable address to it, ex eth0:0. What are my options?
Also how could i do the POSTROUTING SNAT if I cannot use virtual in terfaces?
You can use the Source IP or Destination IP, can't you ?
....-i eth0 -A POSTROUTING -s 192.168.128.6 -j SNAT --to 64.24.12.46 ....-i eth0 -A POSTROUTING -s 192.168.128.5 -j SNAT --to 64.24.12.45
....-i eth1 -A PREROUTING -d 64.24.12.46 -j DNAT --to 192.168.128.6 ....-i eth1 -A PREROUTING -d 64.24.12.45 -j DNAT --to 192.168.128.5