1

I have a small problem. In my setup (linux, kernel 3.10.17) I have one ethernet port and multiple WWAN interfaces; each WWAN has its own VPN already activated. The VPNs are connected to the same server through OpenVPN.

Now I have these four VPNs (I chose to use the tun interface, but if in your opinion tap is better I can change). let's call them tun1..tun4.

Now, I want that all the traffic incoming from the ethernet port go through the VPNs, so I added a table (ta 55) and redirected all the traffic incoming from the ethernet to it:

ip rule add iif eth0 table 55

Now I want to route the traffic to the vpn. Now, if I write

ip ro add ta 55 default nexthop dev tun1 weight 256

and so the table becomes this:

root@mypc:~# ip ro sh ta 55
default dev tun1

then everything works. If I change it to another vpn it still works, so the VPNs are working. If, on the other side, I try to enable the routing to all the vpns, with the command

ip ro add ta 55 default scope global nexthop dev tun1 weight 256 nexthop dev tun2 weight 256 nexthop dev tun3 weight 256 nexthop dev tun4 weight 256

and so getting the table

root@mypc:~# ip ro sh ta 55
default
        nexthop dev tun1 weight 256
        nexthop dev tun2 weight 256
        nexthop dev tun3 weight 256
        nexthop dev tun4 weight 256

the ethernet port becomes not able to surf.

What can I do?

0

You must log in to answer this question.

Browse other questions tagged .