Date: Thu, 20 Jul 2000 23:25:11 +0200 From: Thierry Herbelot <herbelot@cybercable.fr> To: Brian Somers <brian@Awfulhak.org>, net@freebsd.org Cc: stable@freebsd.org Subject: What is wrong in my PPP over UDP config ? (long) Message-ID: <39776E37.BE623003@cybercable.fr>
next in thread | raw e-mail | index | archive | help
Hello, Brian, I'm trying to build on my work LAN a PPP over UDP tunnel (to link two NAT-hidden networks over a public-IP LAN). The problem I see is that the route to the remote network added via the ppp "add" command seems to use the wrong network interface : ed in the following example, instead of the "tun" interface. Thus, I can't ping a machine on the remote "NAT-ed" network without patching the routing table. I must be doing something wrong, but after RTFMing a bit, I can't see what. (both machines use mostly recent FreeBSD versions : 3.5-Stable from the end of June and a 4.0-Stable from the beginning of July - the machines I use at work are built with sourcesfrom the beginning of this month) TIA TfH My configuration follows : I've been following the example in the man page : * on both machines, I've changed the /etc/services file * on the "server", I've changed inetd.conf to add two lines : ------------------------------------ ppp-in stream tcp nowait root /usr/sbin/ppp ppp -direct ppp-in ppp-in dgram udp wait root /usr/sbin/ppp ppp -direct ppp-in ------------------------------------ * on the "server", I've also changed the stock ppp.conf : ------------------------------------ # set timeout 120 ... # add default HISADDR ... ppp-in: set timeout 0 set ifaddr 10.0.4.1 10.0.4.2 add 10.0.1.0/24 10.0.4.2 ------------------------------------ * then I've restarted inetd tfh# killall -INT inetd tfh# uname -a FreeBSD tfh.herbelot.nom 3.5-STABLE FreeBSD 3.5-STABLE #1: Wed Jun 21 08:12:49 CEST 2000 thierry.herbelot@tfh.herbelot.nom:/usr/src/sys/compile/TFH_34 i386 tfh# netstat -nr Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 192.168.1.3 UGSc 4 155 ed2 127.0.0.1 127.0.0.1 UH 0 152 lo0 192.168.1 link#2 UC 0 0 ed2 192.168.1.1 0:40:5:65:66:13 UHLW 4 2300730 lo0 192.168.1.2 0:4f:49:8:17:72 UHLW 7 3156731 ed2 461 192.168.1.3 52:54:4c:1b:90:1b UHLW 4 192099 ed2 1056 tfh# * on the client, I've modified the stock ppp.conf : ------------------------------------ # set timeout 120 ... # add default HISADDR ... tfh: set escape 0xff set device tfh:ppp-in/tcp # I've also tested with udp transport set dial set log Phase Chat Connect hdlc LCP IPCP CCP tun set ifaddr 10.0.4.2 10.0.4.1 add 10.0.2.0/24 10.0.4.1 ------------------------------------ * on the client, I lauch the ppp connection : multi# netstat -nr Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 192.168.1.3 UGSc 13 0 ed0 127.0.0.1 127.0.0.1 UH 0 62 lo0 192.168.1 link#1 UC 0 0 ed0 => 192.168.1.1 0:40:5:65:66:13 UHLW 3 356324 ed0 852 192.168.1.3 52:54:4c:1b:90:1b UHLW 14 27906 ed0 257 192.168.1.255 ff:ff:ff:ff:ff:ff UHLWb 0 5 ed0 multi# ppp -background tfh Working in background mode Using interface: tun0 PPP enabled multi# netstat -nr Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 192.168.1.3 UGSc 13 0 ed0 10.0.2/24 10.0.4.1 UGSc 0 0 ed0 ^^^^ 10.0.4.1 10.0.4.2 UH 0 0 tun0 127.0.0.1 127.0.0.1 UH 0 62 lo0 192.168.1 link#1 UC 0 0 ed0 => 192.168.1.1 0:40:5:65:66:13 UHLW 4 356362 ed0 764 192.168.1.3 52:54:4c:1b:90:1b UHLW 14 27906 ed0 169 192.168.1.255 ff:ff:ff:ff:ff:ff UHLWb 0 5 ed0 multi# --- at this moment I can't ping machines on the 10.0.2 network --- (I can ping 10.0.4.1, though) --- if I re-create manually the remote route, all is well : multi# route delete -net 10.0.2 delete net 10.0.2 multi# route add -net 10.0.2 10.0.4.1 add net 10.0.2: gateway 10.0.4.1 multi# netstat -nr Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 192.168.1.3 UGSc 12 0 ed0 10.0.2/24 10.0.4.1 UGSc 0 0 tun0 ^^^^ 10.0.4.1 10.0.4.2 UH 1 0 tun0 127.0.0.1 127.0.0.1 UH 0 62 lo0 192.168.1 link#1 UC 0 0 ed0 => 192.168.1.1 0:40:5:65:66:13 UHLW 5 356415 ed0 259 192.168.1.3 52:54:4c:1b:90:1b UHLW 14 27907 ed0 864 192.168.1.255 ff:ff:ff:ff:ff:ff UHLWb 0 5 ed0 multi# multi# tcpdump -i tun0 tcpdump: listening on tun0 23:07:46.527098 10.0.4.2 > 10.0.2.1: icmp: echo request 23:07:47.528903 10.0.4.2 > 10.0.2.1: icmp: echo request 23:07:48.529749 10.0.4.2 > 10.0.2.1: icmp: echo request 23:07:49.530623 10.0.4.2 > 10.0.2.1: icmp: echo request 23:07:50.531443 10.0.4.2 > 10.0.2.1: icmp: echo request 23:07:51.532280 10.0.4.2 > 10.0.2.1: icmp: echo request (in another xterm) multi% ping 10.0.2.1 PING 10.0.2.1 (10.0.2.1): 56 data bytes ^C --- 10.0.2.1 ping statistics --- 6 packets multi% uname -a FreeBSD multi.herbelot.nom 4.0-STABLE FreeBSD 4.0-STABLE #3: Sun Jul 2 23:03:56 CEST 2000 thierry.herbelot@multi.herbelot.nom: /files3/src/sys/compile/multi i386 multi% transmitted, 0 packets received, 100% packet loss multi% -- Thierry Herbelot ASCII RIBBON CAMPAIGN /"\ AGAINST HTML MAIL & NEWS \ / PAS DE HTML DANS X LES COURRIELS / \ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?39776E37.BE623003>