# [FIXED] PPTP tunnel with Linux Server and LAN

## kuteninja

I'm having some difficulty setting this up, could you help me?

The basic networking I've setup is this:

```
PC [Windows 7]

   => LAN [192.168.1.0]

      => Gentoo Router [192.168.1.1]

         => MASQUERADE to Internet [ISP]

            => some websites
```

But I want to visit some sites (eg Pandora) using a PPTP network. To try the setup I'll be using the IP 8.8.8.8 (Google DNS).

The ideal setup would be this:

```
PC [Windows 7] 

   => LAN [192.168.1.0] 

      => Gentoo Router [192.168.1.1] 

         - a normal site => MASQUERADE to Internet [ISP]

         - is 8.8.8.8 => MASQUERADE to PPTPD Server [10.10.0.1]

                => MASQUERADE to 8.8.8.8
```

But it doesn't work properly from the LAN.

From the Gentoo Router, I've tested by ping and traceroute to 8.8.8.8 and PPTP redirection works.

This is a tcpdump:

```
18:01:27.619577 IP 10.10.0.100 > 8.8.8.8: ICMP echo request, id 47438, seq 1, length 64

18:01:28.620543 IP 10.10.0.100 > 8.8.8.8: ICMP echo request, id 47438, seq 2, length 64

18:01:29.622057 IP 10.10.0.100 > 8.8.8.8: ICMP echo request, id 47438, seq 3, length 64
```

(10.10.0.100 is the inet addr from ppp0)

But now, when I ping the same IP from my computer (on the LAN), it doesn't work, and it seems that it's not properly "masquerated" (or masked if you preffer)

```
18:01:35.296342 IP 192.168.1.20 > 8.8.8.8: ICMP echo request, id 1, seq 25, length 40

18:01:40.042437 IP 192.168.1.20 > 8.8.8.8: ICMP echo request, id 1, seq 26, length 40

18:01:45.042585 IP 192.168.1.20 > 8.8.8.8: ICMP echo request, id 1, seq 27, length 40
```

I've tried to repeat my Masquerade (LAN > WAN traffic) for the VPN, like this:

```
iptables -t nat -A POSTROUTING -o ppp0+ -j MASQUERADE
```

And now the tcpdump looks more promissing but still, my computer doesn't recieve replies of the ping command:

```
18:10:09.052507 IP 10.10.0.100 > 8.8.8.8: ICMP echo request, id 1, seq 29, length 40

18:10:14.049119 IP 10.10.0.100 > 8.8.8.8: ICMP echo request, id 1, seq 30, length 40

18:10:19.048406 IP 10.10.0.100 > 8.8.8.8: ICMP echo request, id 1, seq 31, length 40
```

(The computer on 192.168.1.20 shows timeouts on the ping response)

What could I be missing ? Some strange Masquerade like ppp0+ to LAN ?Last edited by kuteninja on Mon Mar 28, 2011 9:41 pm; edited 1 time in total

----------

## kuteninja

Fixed  :Very Happy: 

I was missing the FORWARD ACCEPT rule from the VPN to the LAN

----------

