# Internet traffic doesn't go through the VPN gateway



## kenadams (Jan 29, 2013)

I have a FreeBSD 9.1 in my LAN as internet gateway for other PCs and it works fine.
The problem is when I connect the gateway machine to VPN (with pptpclient) the internet traffic of other PCs doesn't go through the VPN connection.

Any help will be appreciated.

LAN : 192.168.0.0/24       
VPN: 10.0.0.0/24

FreeBSD Gateway: 192.168.0.130
Internet Router : 192.168.0.1


*ifconfig*:

```
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
        ether 08:00:27:78:11:81
        inet 192.168.0.130 netmask 0xffffff00 broadcast 192.168.0.255
        inet6 fe80::a00:27ff:fe78:1181%em0 prefixlen 64 scopeid 0x1
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet 127.0.0.1 netmask 0xff000000
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
ipfw0: flags=8801<UP,SIMPLEX,MULTICAST> metric 0 mtu 65536
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1498
        options=80000<LINKSTATE>
        inet 10.0.0.13 --> 10.0.0.1 netmask 0xffffffff
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        Opened by PID 917
```

*netstat -nr*:


```
Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
default            192.168.0.1        UGS         0       82    em0
10.0.0.0/24         10.0.0.1           UGS         0        0   tun0
10.0.0.1           link#5             UHS         0        0   tun0
10.0.0.13          link#5             UHS         0        0    lo0
127.0.0.1          link#3             UH          0        0    lo0
192.168.0.0/24     link#1             U           0      380    em0
192.168.0.130      link#1             UHS         0        0    lo0
```

ppp.conf:


```
VPN:
  set authname user
  set authkey  pass
  set timeout 0
  set ifaddr 0 0
  add 10.0.0.0/24 HISADDR
  alias enable yes
  disable ipv6cp
```


----------



## gkontos (Jan 29, 2013)

The endpoint of the VPN expects to see traffic from 10.0.0.13/32 and drops all other traffic.

Either use a site to site VPN or try to "fool" the other side by performing NAT using 10.0.0.13/32.


----------



## kenadams (Jan 30, 2013)

*Thanks*

Thanks for your response.


----------



## Michel98 (Apr 30, 2013)

Hello,

Thank you for that answer, because I have encountered the same problem.

Michel


----------

