Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am trying to create test setup to verify PPP packet flow though a custom PPP server. To do so, I want to create a PPP tunnel on a local computer using virtual serial ports using socat.

                                   <Virtual tty>
ip traffic<---> ppp0 (ip:1.1.1.1) <-------------> ppp1 (ip:2.2.2.2)<-----> eth0 (ip:192.168.1.2, gw 192.168.1.1)

Ultimately i want to capture PPP packets and analyse/debug them.

This is what i have tried till now

#screen socat -d -d pty,raw,echo=0 pty,raw,echo=0 &
2013/08/09 03:35:43 socat[5809] N PTY is /dev/pts/14
2013/08/09 03:35:43 socat[5809] N PTY is /dev/pts/15

Then

#sudo pppd -detach crtscts lock noauth local 1.1.1.1:2.2.2.2 /dev/pts/14 115200 &
#sudo pppd -detach crtscts lock noauth local 2.2.2.2:1.1.1.1 /dev/pts/6 115200 &

This creates ppp0 and ppp1 interfaces.Since the traffic is routed locally, i tried deleting routing entries in local table using

#ip route del table local 2.2.2.2
#ip route del table local 1.1.1.1

When i try to ping 2.2.2.2 using 1.1.1.1 ie

#ping 2.2.2.2 -i 1.1.1.1 
bind: Cannot assign requested address

I ultimately want all my internet traffic to pass through this tunnel. Is this setup possible?

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.