Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    need help with iproute2 and multiple NATs

    In the past I got this to work, but on a new server I just built I cannot.

    I have two networks set up on one interface.

    eth4 is
    eth4:0 is

    I have two outgoing connections - eth3 is my cable modem, and ppp0 is a PPTP VPN.

    I want workstations in the network to use the cable modem, and workstations in the network to use the VPN.

    On my other server, I was using iproute2:
    ifconfig eth4:0 netmask
    ip route flush table 18
    ip route add table 18 to dev eth4:0
    ip rule add from table 18 priority 18
    ip route flush cache
    ip route add table 18 to default via $PPP_REMOTE dev ppp0

    via iptables I masquerade traffic from to ppp0:
    iptables -t nat -A POSTROUTING -s -o ppp0 -j MASQUERADE

    my network is working fine. It's simply masqueraded in the same manner over eth3. traffic from is not getting out, and I'm not sure what I'm missing here. like I said, masquerading/NAT works fine on this system, as can get out to the internet without issue.

    As you can see, I have three other ethernet interfaces in this box, so I could just move to one of those and plug it into my switch and try that. And I might. But I am perplexed here, because this exact setup worked as I expected on my old server.

    I'd been thinking of using multiple (physical) ethernet interfaces anyway, to increase the bandwidth from the server to the LAN. any advice here is appreciated. I enjoy system administration, but am an amateur, and I know it.

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    The Keystone State
    Show the output from the following commands;

    route -n


    The adventure of a life time.

    Linux User #296285
    Get Counted

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts