IPTables/Route and multiple interfaces configuration
===

I've this scenario, a Debian box running with multiple network cards:

 1. **eth0** - Internet Connection via local Router (172.20.1.x , 255.255.255.0)
 2. **ppp0** - Dial-up to a network without internet (10.x.x.x , 255.255.255.255)
 3. **tun0** - Virtual OpenVPN Tun interface (172.50.1.x, 255.255.255.255)

My goal is to allow clients to connect to the VPN over ppp0 and forward their internet traffic to eth0.

Right now, clients can connect to the VPN and they are able to reach the router on eth0 172.20.1.1, but they can't get to google or anywhere else on the internet. (And no, it's not a DNS issue. I tried the IP)

How can I setup iptables/route to allow this?

I think the problem is related to routing because on the debian machine I can ping and access the router (172.20.1.1) too, but I don't have internet access.

    root@iklive-shv1:~# ping 172.20.1.1
    PING 172.20.1.1 (172.20.1.1) 56(84) bytes of data.
    64 bytes from 172.20.1.1: icmp_req=1 ttl=64 time=0.416 ms
    64 bytes from 172.20.1.1: icmp_req=2 ttl=64 time=0.428 ms
    ^C
    --- 172.20.1.1 ping statistics ---
    2 packets transmitted, 2 received, 0% packet loss, time 1001ms
    rtt min/avg/max/mdev = 0.416/0.422/0.428/0.006 ms
    root@iklive-shv1:~# ping google.com
    PING google.com (173.194.34.197) 56(84) bytes of data.
    ^C
    --- google.com ping statistics ---
    4 packets transmitted, 0 received, 100% packet loss, time 3003ms
    
    root@iklive-shv1:~# ping 173.194.34.197
    PING 173.194.34.197 (173.194.34.197) 56(84) bytes of data.
    ^C
    --- 173.194.34.197 ping statistics ---
    3 packets transmitted, 0 received, 100% packet loss, time 2004ms

I also tried to change the default gateway to the router IP (172.20.1.1) using this:

    route add default gw 172.20.1.1 eth0

Now I can access the internet but then clients can't connect or ping my machine over the dial-up connection (ppp0).

Thank you!