Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Jul 2008 03:08:11 +0930
From:      Andrew D <andrewd@webzone.net.au>
To:        freebsd-questions@freebsd.org
Subject:   pptp and routing
Message-ID:  <488CB283.80400@webzone.net.au>

next in thread | raw e-mail | index | archive | help
G'Day all,

got a freebsd Box
FreeBSD gw.ade.eltrak.com.au 7.0-STABLE FreeBSD 7.0-STABLE #0: Wed Jul 
9 03:46:03 CST 2008 
root@gw.ade.eltrak.com.au:/usr/obj/usr/src/sys/ELKERN  i386

that has a poptop server on it. When a client logs in they get authed 
fine and get issued an IP. However when connecting or pinging no data 
comes back from the server.  arpproxy is set, as is forwarding.
net.inet.ip.forwarding: 1
net.link.ether.inet.proxyall: 1

The server for some reason puts a route for the client ip on the 
ethernet interface rather than the tun interface the client has come in on.

/etc/ppp/ppp.conf


loop:
     set timeout 0
     set log phase chat connect lcp ipcp command
     set device localhost:pptp
     set dial
     set login
     set ifaddr 10.10.1.5 10.10.1.20-10.10.1.60 255.255.255.0
     add default HISADDR
     set server /tmp/loop "" 0177

loop-in:
     set timeout 0
     set log phase lcp ipcp command
     allow mode direct

pptp:
     load loop
     disable pap
     enable passwdauth
     disable ipv6cp
     enable proxy
     accept dns
     enable MSChapV2
     enable mppe
     disable deflate pred1
     deny deflate pred1
     set dns 10.10.1.5
     set device !/etc/ppp/secure



/etc/ppp/secure

#!/bin/sh
exec /usr/sbin/ppp -direct loop-in



/usr/local/etc/pptpd.conf


localip 10.10.1.5
remoteip 10.10.1.20-60
pidfile /var/run/pptpd.pid
noipparam
debug



$ ifconfig
fxp0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 
0 mtu 1500
         options=8<VLAN_MTU>
         ether 00:04:ac:98:d2:c6
         inet 10.10.1.5 netmask 0xffffff00 broadcast 10.10.1.255
         media: Ethernet autoselect (100baseTX <full-duplex>)
         status: active
re0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
 
options=399b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_UCAST,WOL_MCAST,WOL_MAGIC>
         ether 00:40:ca:23:ed:5f
         media: Ethernet autoselect (100baseTX <half-duplex>)
         status: no carrier
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
         inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
         inet6 ::1 prefixlen 128
         inet 127.0.0.1 netmask 0xff000000
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1500
         inet 10.8.0.1 --> 10.8.0.2 netmask 0xffffffff
         Opened by PID 775
tun1: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1398
         inet 10.10.1.5 --> 10.10.1.34 netmask 0xffffff00
         Opened by PID 14740

$ netstat -nr
Routing tables

Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
default            10.10.1.254        UGS         0    29107   fxp0
10.8.0.0/24        10.8.0.2           UGS         0      215   tun0
10.8.0.2           10.8.0.1           UH          2       45   tun0
10.10.1.0/24       link#1             UC          0        0   fxp0
10.10.1.5          00:04:ac:98:d2:c6  UHLW        2      322    lo0
10.10.1.34         10.10.1.5          UGH         0        0   fxp0
10.10.1.254        00:1e:be:97:95:23  UHLW        2        0   fxp0 
10.10.2.0/24       10.8.0.2           UGS         0      918   tun0
127.0.0.1          127.0.0.1          UH          0      208    lo0



As you can see the client (10.10.1.34) is routed on the fxp0 interface 
rather than the tun1.

Anyone got any Ideas?

Cheers
cya
Andrew




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?488CB283.80400>