3

I have two Vritual Machines (part of a bridged network) (both Ubuntu 64-bit) running Oracle VM Box.

I can communicate between the two machines using netcat.I have installed ppp daemon on both the machines.The name and the IP address of the machines are given below.

nas 192.168.129.153 (Acts as the server) home_user 192.168.129.152 (Acts as the )

I run the following commands from the server and the client respectively

@Server (nas) sudo pppd 192.168.129.153:192.168.129.152 nodetach pty "nc -l 3333 pppd"

@Client (home_user) sudo pppd 192.168.129.152:192.168.129.153 nodetach pty “nc 129.168.129.153 3333”

I get the following messages from the server and client respectively.

@server


sudo pppd 192.168.129.152:192.168.129.153 nodetach pty "nc 192.168.129.153 3333" 
Using interface ppp0 
Connect: ppp0 <--> /dev/pts/2 
CCP: timeout sending Config-Requests 
IPCP: timeout sending Config-Requests 
Connection terminated. 
Modem hangup Child process nc
192.168.129.153 3333 (pid 2298) terminated with signal 15

@Client


sudo pppd 192.168.129.153:192.168.129.152 nodetach pty "nc -l 3333"
Using interface ppp0
Connect: ppp0 <--> /dev/pts/1
Deflate (15) compression enabled
local  IP address 192.168.129.153
remote IP address 192.168.129.152
No response to 4 echo-requests
Serial link appears to be disconnected.
Connect time 2.5 minutes.
Sent 1060 bytes, received 0 bytes.
Connection terminated.
Modem hangup.

My final aim is to disable authentication and have the NAS (Server) end suppply a fixed IP address and a default route to the home user end.

Any help would be highly appreciated.

1 Answer 1

2

First: Whoa, that's pretty cool :) It's been a while since I saw someone do something clever with PPP.

Second: Really not clear on why. You already have IP based communication between the two hosts, it doesn't give you much in the way of privacy (probably not anything, really)...?

Now, the brass tacks:

The IP addresses specified in the arguments to pppd seem wrong for two reasons:

  1. They appear to be the same as the IP addresses of the two machines on different (non-PPP) interfaces. I can't think of a situation where that is correct. In my opinion this is the cause of your problem. You're trying to ping an IP address that exists on the other end of two interfaces, and that itself is intended to have two interfaces with that IP address.

  2. You're specifying the IP addresses on both the client and the server. That's technically okay, but since over-specifying here can cause a failure to negotiate, I'd remove the IP addresses from the client and instead set noipdefault there.

I would suggest picking an IP address pair for PPP negotiation that are NOT on a valid public network (you've done that), and that are NOT associated with a network that is already accessible to your two computers. E.g. 10.1.1.1:10.1.1.2

This looks like the following when done over the loopback interface:

Server:

$ sudo pppd 10.1.1.1:10.1.1.2 nodetach pty "nc -l 3333"
Using interface ppp0
Connect: ppp0 <--> /dev/pts/4
Deflate (15) compression enabled
local  IP address 10.1.1.1
remote IP address 10.1.1.2

Client:

jnisbet2@decimate:~$ sudo pppd noipdefault nodetach pty "nc 127.0.0.1 3333"
Using interface ppp1
Connect: ppp1 <--> /dev/pts/6
Deflate (15) compression enabled
local  IP address 10.1.1.2
remote IP address 10.1.1.1

The only practical effect of this process is to give you a different IP address for communicating with the remote host, and this is only really visible from inside the two endpoint hosts, so I'm not sure why you're interested in this project, but shrug. Oh, and there is a timeout for the server; if there is no connection within a minute or two, the server quits:

LCP: timeout sending Config-Requests
Connection terminated.
Modem hangup
Child process nc -l 3333 (pid ####) terminated with signal 15
1
  • 1
    Not sure why the OP wants it, but I use it to turn one-way connections into two-way connections through firewalls and suchlike, or to tunnel a direct connection through multiple hops.
    – Perkins
    Nov 21, 2018 at 2:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .