1

I have the following interfaces: eth0, eth0:0, and eth1. eth0:0 is virtual and also it faces WAN (interent). eth0 is 192.168.0.0/24 and eth1 is 10.0.0.0/24. How can I enable NAT and make eth0:0 as gateway for both 192.168.0.0/24 and 10.0.0.0/24 networks.

4
  • Do you mean: eth0:0 has a public IP address? Okay, now I'm confused. If eth0 is a private network, why do you put a public IP there??
    – pepoluan
    Mar 9, 2011 at 15:38
  • I have only two interfaces, and I want both for private network.
    – nixnotwin
    Mar 9, 2011 at 17:03
  • can you post the output of ifconfig, ip address show, and ip route show? Feel free to replace any public IP with a generalized one (e.g., 11.22.33.xx)
    – pepoluan
    Mar 10, 2011 at 7:36
  • @pepoluan I bought and installed a third NIC, and you gave the right solution in another question on this site.
    – nixnotwin
    Apr 4, 2011 at 16:54

1 Answer 1

1

iptables doesn't support virtual interfaces, so you have to match IP ranges in rules in order to achieve this.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .