Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

1 votes
0 answers
1049 views
How to get PPPD to work with systemd-networkd?
This appears similar to another [question][1], but nothing was ever followed up on it. I'm currently having trouble with `pppd` as a systemd service. I'm waiting for the network adapter to come online before attempting to setup the pppoe link. The service: ``` [Unit] Description=PPPoE connection Aft...
This appears similar to another question , but nothing was ever followed up on it. I'm currently having trouble with pppd as a systemd service. I'm waiting for the network adapter to come online before attempting to setup the pppoe link. The service:
[Unit]
Description=PPPoE connection
After=network.target

[Service]
Type=oneshot
ExecStart=/usr/sbin/pppd call dsl-provider
Restart=on-failure

[Install]
WantedBy=sys-subsystem-net-devices-eth1.device
Where eth1 is the device upon which the pppoe link will be made. Inspection of the service's logs with journalctl -u pppoe.service shows:
debian systemd[1] : Starting pppoe.service - PPPoE connection...
debian pppd: Plugin rp-pppoe.so loaded.
debian pppd: Plugin rp-pppoe.so loaded.
debian pppd: pppd 2.4.9 started by root, uid 0
debian pppd: Timeout waiting for PADO packets
debian pppd: Unable to complete PPPoE Discovery
...
debian pppd: Timeout waiting for PADO packets
debian pppd: Unable to complete PPPoE Discovery
debian pppd: Exit.
debian systemd[1] : pppoe.service: Deactivated successfully.
debian systemd[1] : Finished pppoe.service - PPPoE connection.
This is the same whether the service is run automatically at boot or with systemctl start pppoe. When pppd is run manually with pppd call dsl-provider it works as expected. What could be causing this issue? Thanks
Synthetic Ascension (249 rep)
Jul 26, 2024, 03:35 PM • Last activity: Jul 26, 2024, 03:57 PM
0 votes
1 answers
1149 views
SonicWall NetExtender not working
I recently moved to another company. I had to format my computer, so I decided to test Debian 11. But now I'm facing some issues with VPN. I can't connect to any site that's only is available under VPN. They use SonicWall NetExtender. I've got some logs but it doesn't provides any clues about what i...
I recently moved to another company. I had to format my computer, so I decided to test Debian 11. But now I'm facing some issues with VPN. I can't connect to any site that's only is available under VPN. They use SonicWall NetExtender. I've got some logs but it doesn't provides any clues about what is happening...
04/20/2022 20:25:55.411 [connect info    14505] User:   
04/20/2022 20:25:55.411 [connect info    14505] Domain: 
04/20/2022 20:25:55.411 [connect info    14505] Server: 
04/20/2022 20:25:55.457 [general notice  14505] Connecting to ...
04/20/2022 20:25:55.554 [general notice  14505] Connected.
04/20/2022 20:25:55.554 [general notice  14505] Logging in...
04/20/2022 20:25:55.645 [general notice  14505] Login successful.
04/20/2022 20:25:55.806 [general error   14505] Version header not found
04/20/2022 20:25:55.806 [epc     info    14505] Server don't support EPC check. Just pass EPC check
04/20/2022 20:25:55.806 [general warn    14505] WireGuard is not capable, root permission is required.
04/20/2022 20:25:55.907 [connect notice  14505] Try to connect with SSLVPN...
04/20/2022 20:25:56.160 [general notice  14505] SSL Connection is ready
04/20/2022 20:25:57.166 [general info    14505] Using new PPP frame encoding mechanism
04/20/2022 20:25:57.167 [general info    14505] Using PPP async mode (chosen by server) 
04/20/2022 20:25:57.167 [general info    14505] Connecting tunnel...
04/20/2022 20:26:00.282 [connect info    16154] PPP interface up
04/20/2022 20:26:01.282 [dns     notice  16154] Setting up DNS
04/20/2022 20:26:01.296 [general info    16154] Setting up DNS suffixes
04/20/2022 20:26:01.301 [general info    16172] Monitoring processes:  nx=14505, pppd=16132
04/20/2022 20:26:01.301 [dns     info    16172] Monitoring nameserver: 
04/20/2022 20:26:01.301 [dns     info    16172] Monitoring nameserver: 
04/20/2022 20:26:01.301 [dns     info    16172] Monitoring DNS suffix: 
04/20/2022 20:26:01.301 [dns     info    16172] Monitoring DNS suffix: 
04/20/2022 20:26:02.262 [general info    14505] Client IP Address: 
04/20/2022 20:26:02.262 [general info    14505] You now have access to the following 25 remote networks:
04/20/2022 20:26:02.262 [general info    14505] [redacted information]
04/20/2022 20:26:02.264 [general notice  14505] NetExtender connected successfully.
04/20/2022 20:26:02.412 [general info    14505] Saving profiles/preferences...
04/20/2022 20:26:02.412 [general info    14505] Done saving profiles/preferences
Apparently I'm connected but I can't reach any site that's depends on VPN. EDIT: As suggested in comment
# ip route
default via  dev wlp4s0 proto dhcp metric 600 
/16 via  dev ppp0 
 via  dev ppp0 
 via  dev ppp0 
 via  dev ppp0 
 via  dev ppp0 
 via  dev ppp0 
 via  dev ppp0 
 via  dev ppp0 
 via  dev ppp0 
/16 via  dev ppp0 
/16 via  dev ppp0 
/16 dev wlp4s0 scope link metric 1000 
/12 via  dev ppp0 
/16 dev docker0 proto kernel scope link src  linkdown 
 via  dev wlp4s0 
 via  dev ppp0 
 dev ppp0 proto kernel scope link src  
/24 dev wlp4s0 proto kernel scope link src  metric 600 
 dev wlp4s0 scope link 
/24 via  dev ppp0 
/22 via  dev ppp0 
/23 via  dev ppp0 
/23 via  dev ppp0 
/22 via  dev ppp0 
/24 via  dev ppp0 
/23 via  dev ppp0 
/23 via  dev ppp0 
/24 via  dev ppp0 
 via  dev ppp0 
 via  dev ppp0

# ip link
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp3s0:  mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
    link/ether 7c:8a:e1:d8:d2:89 brd ff:ff:ff:ff:ff:ff
3: wlp4s0:  mtu 1500 qdisc noqueue state UP mode DORMANT group default qlen 1000
    link/ether 5c:cd:5b:52:8e:ec brd ff:ff:ff:ff:ff:ff
5: docker0:  mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:16:bf:bb:e8 brd ff:ff:ff:ff:ff:ff
8: ppp0:  mtu 1280 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 3
    link/ppp 

# ip address
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp3s0:  mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether 7c:8a:e1:d8:d2:89 brd ff:ff:ff:ff:ff:ff
3: wlp4s0:  mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 5c:cd:5b:52:8e:ec brd ff:ff:ff:ff:ff:ff
    inet /24 brd 192.168.15.255 scope global dynamic noprefixroute wlp4s0
       valid_lft 11638sec preferred_lft 11638sec
    inet6 2804:7f0:b980:7174:f5b5:34f3:be57:c90e/64 scope global dynamic noprefixroute 
       valid_lft 43170sec preferred_lft 43170sec
    inet6 fe80::f9c3:d2a:431f:b878/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
5: docker0:  mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:16:bf:bb:e8 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever
8: ppp0:  mtu 1280 qdisc pfifo_fast state UNKNOWN group default qlen 3
    link/ppp 
    inet  peer /32 scope global ppp0
       valid_lft forever preferred_lft forever
Mirusky (101 rep)
Apr 20, 2022, 11:39 PM • Last activity: Jul 25, 2024, 02:07 PM
3 votes
2 answers
7269 views
How to change the default source IP address to be something other than the address facing the default route?
**Background Information** * I'm using a Linux system to route traffic for a small block of public IPv4 addresses (by enabling IP forwarding in `sysctrl.conf`). * The router is connecting to the ISP over `eth1` using PPPoE. * The local peer address used for ppp is a manually-configured IP address th...
**Background Information** * I'm using a Linux system to route traffic for a small block of public IPv4 addresses (by enabling IP forwarding in sysctrl.conf). * The router is connecting to the ISP over eth1 using PPPoE. * The local peer address used for ppp is a manually-configured IP address that was specified by the ISP. The local peer address is 10.0.0.10. * The remote peer address used for ppp is also a manually-configured IP address that was specified by the ISP. The remote peer address is 10.0.0.9. * The router's default route is 10.0.0.9 via 10.0.0.10. * The router is connected to an Ethernet switch via eth0. eth0 is configured to use one of the public addresses. * The switch connects all other public hosts. Each connected host uses a public IP address.
10.0.0.9
ISP ----------+
              |   10.0.0.10                       X.X.X.X
              +------------- (eth1) ROUTER (eth0) --------------- SWTICH 
                                                                     |     
                                                                     +-- X.X.X.Y
                                                                     +-- X.X.X.Z
                                                                     ...
**My Problem** Everything works as expected except for programs running on the router. Any application that I run on the router uses 10.0.0.10 as the source IP address when initiating connections to the internet. This is understandable since eth1 is where the internet is available. However, because the address is not publicly routable, apt, ping, and other programs don't work. If I explicitly set the source address on applications that support it (i.e. ping), applications do work. **My Question** How can I configure the router to route unknown packets via eth1/10.0.0.9 while also using the public IP address on eth0 as the default source when initiating new connections?
Tenders McChiken (1319 rep)
Mar 9, 2020, 12:17 PM • Last activity: Mar 27, 2024, 09:07 PM
0 votes
1 answers
272 views
How to find the parent network device for a PPPoE device
For a POINTOPOINT [PPPoE](https://en.m.wikipedia.org/wiki/Point-to-Point_Protocol_over_Ethernet) `ppp0` device in Linux, how to get the underlying ethernet device in a reliable way? I've looked in the output of `ip -d link` and in the `/sys/class/net/ppp0` directory, but neither mention the parent d...
For a POINTOPOINT [PPPoE](https://en.m.wikipedia.org/wiki/Point-to-Point_Protocol_over_Ethernet) ppp0 device in Linux, how to get the underlying ethernet device in a reliable way? I've looked in the output of ip -d link and in the /sys/class/net/ppp0 directory, but neither mention the parent device, nor the PID of the pppd process. If only one pppd runs on the system, then there is a "workaround":
`
$ cat /proc/net/pppoe
Id       Address           Device
0000516D dc:99:16:c4:58:35 wan.25
` In this case, wan.25 is the wanted info. But that "Id" 0000516D I have not seen other places linking it to the PPP device. So how would I differentiate between several PPPoE interfaces?
Alex Stragies (6144 rep)
Jun 27, 2023, 05:45 PM • Last activity: Jul 2, 2023, 03:49 PM
4 votes
1 answers
2536 views
IPv6 over PPPoE
I have a PPPoE link and some addresses. IPv4 addresses work fine. IPv6 not at all. I found out I had to add `+ipv6` in ppp/options. If I `ping ff02::1%ppp0` I only get replies from two `fe80::` addresses, one was automatically assigned to the interface and the other one is reported as *peer* by `ip...
I have a PPPoE link and some addresses. IPv4 addresses work fine. IPv6 not at all. I found out I had to add +ipv6 in ppp/options. If I ping ff02::1%ppp0 I only get replies from two fe80:: addresses, one was automatically assigned to the interface and the other one is reported as *peer* by ip address. The routable address I assigned doesn't play. I found a [traceroute test](https://tools.keycdn.com/traceroute) on the Internet. It cannot reach the address that my ISP assigned me, 2a02:29e1:300:e900::1. It shows some loops, which, if it were IPv4, I'd definitely classify as router misconfiguration. My ISP says there are no anomalies on their IPv6, which is on the same BRAS as mine. I asked again and they reassured me everything is fine on their side, and they cannot help me on a custom configuration. (Custom because I avoided installing a router). I tried and installed radvd but it doesn't seem to do anything interesting —indeed, radvdump shows continuous work on another interface, which has no routable IPv6 address, although I tried to disable it by setting AdvSendAdvert off. When I try traceroute, I get no response. I issue, for example, sudo traceroute -6 -n -i ppp0 -I 2a02:29e0:404::172:162. tcpdump -i ppp0 ip6 shows only echo requests going out. I use -I because I allow ICMP access. Yet, after attempting traceroute, ip6tables-save -c reports an increased amount of dropped input packets:
:INPUT DROP [259:20898]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [374:39007]
[0:0] -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
[0:0] -A INPUT -p tcp -m conntrack --ctstate NEW -m multiport --dports 80,443 -j ACCEPT
[371:25320] -A INPUT -p ipv6-icmp -j ACCEPT
My only previous experience with IPv6 was using a tunnel. It had been enough to assign the addresses and it worked without problems. As something must be wrong with routing, here's radvd's config:
interface ppp0
{
	IgnoreIfMissing off;
	AdvSendAdvert on;
	prefix 2a02:29e1:300:e900::/64
	{
	};
};

interface eth1r
{
	AdvSendAdvert off;
};
Is it the right tool at all? **Edit**: IPv6 routes:
north:~$ ip -6 r l
2a02:29e1:300:e900::/64 dev ppp0 proto kernel metric 256 pref medium
fe80::f3:6aec dev ppp0 proto kernel metric 256 pref medium
fe80::51c9:88dc:1c75:9a51 dev ppp0 proto kernel metric 256 pref medium
fe80::/64 dev eth0r.100 proto kernel metric 256 pref medium
fe80::/64 dev eth0r proto kernel metric 256 pref medium
fe80::/64 dev eth1r proto kernel metric 256 pref medium
fe80::/64 dev eth2r proto kernel metric 256 pref medium
default dev ppp0 metric 1024 pref medium
Here eth0r.100 is the 802.1Q interface which starts ppp0. eth1r is a backup natted wan which should stay IPv4-only. eth2r is a lan, which could use IPv6 eventually (perhaps radvd can be useful in that case?). As for the **routing loop**, the traceroute test mentioned above runs from ten cities around the world, and none of them reaches my interface; all of them fall into the same loop reported by [Bib](https://unix.stackexchange.com/users/433674/bib) , around the following five nodes:
2a00:6d42::1:0:1:36       Aruba S.p.A. (sometimes ???)
2a00:6d42:0:2:5::12            "             "
2a02:29e1::a              Seflow s.r.l. (my ISP)
2a02:29e0:109:ff00::5          "
2a02:29e0:255::2               "
2001:7f8:c5::a503:1034:1  Samer Abdel-Hafez (sometimes ???)
The bottom one, from Amsterdam, points back to Aruba and the loop starts over again. Can that be caused by a lack of advertising on my side? But then, how could I be able to advertise anything if I don't get any IPv6 reply from ppp0?
Ale (185 rep)
Apr 13, 2023, 06:42 PM • Last activity: May 22, 2023, 10:28 AM
0 votes
0 answers
63 views
ppp options.tty serial by-id
When my machine reboots it's a lottery which USB devices get assigned to which `ttyUSBn`. Therefore I have to rename `/etc/ppp/options.ttyUSB0` periodically. I've tried `/etc/ppp/options.usb-FTDI_FT232R_USB_UART_00000000-if00-port0` but that doesn't work. Is there a way of doing it? All I can think...
When my machine reboots it's a lottery which USB devices get assigned to which ttyUSBn. Therefore I have to rename /etc/ppp/options.ttyUSB0 periodically. I've tried /etc/ppp/options.usb-FTDI_FT232R_USB_UART_00000000-if00-port0 but that doesn't work. Is there a way of doing it? All I can think of is a cron @reboot job for root
#!/bin/sh
tty=$(ls -l /dev/serial/by-id | grep FTDI | cut -d '/' -f 3)
cp /etc/ppp/options.usb-FTDI_FT232R_USB_UART_00000000-if00-port0 "/dev/ppp/options.$(tty)"
```
Richard Barraclough (550 rep)
Mar 20, 2023, 11:40 AM
2 votes
0 answers
1207 views
Ping to any ip does not work on ppp0 from USB 3G modem Huawei using wvdial
I have a Debian OS on a Banana pi and I use a Huawei 3G modem to connect to the internet from it using the wvdial tool. I also have the usb-modeswitch installed and I think the modem is working as a modem correctly. The existing setup was working correctly for a few months until I decided to turn of...
I have a Debian OS on a Banana pi and I use a Huawei 3G modem to connect to the internet from it using the wvdial tool. I also have the usb-modeswitch installed and I think the modem is working as a modem correctly. The existing setup was working correctly for a few months until I decided to turn off the banana pi and left it for about 3 months and now when I try to connect to the internet using the same settings it is not working. I am able to connect to the internet carrier but cant use the internet. When I type **ping 8.8.8.8** or **ping -I ppp0 8.8.8.8** it does not respond anything and returns: --- 8.8.8.8 ping statistics --- 194 packets transmitted, 0 received, 100% packet loss, time 193000ms my **wvdial.conf** looks like this: [Dialer Defaults] Init1 = ATZ Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 Init3 = AT+CGDCONT=1,"IP","internet.unite.md" Modem Type = Analog Modem Studpi Mode = 1 Baud = 9600 New PPPD = yes Modem = /dev/ttyUSB0 ISDN = 0 Phone = *99# Username = tmn Password = tmn when I run **sudo wvdial** I get: --> WvDial: Internet dialer version 1.61 --> Initializing modem. --> Sending: ATZ ATZ OK --> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 OK --> Sending: AT+CGDCONT=1,"IP","internet.unite.md" AT+CGDCONT=1,"IP","internet.unite.md" OK --> Modem initialized. --> Sending: ATDT*99# --> Waiting for carrier. ATDT*99# CONNECT --> Carrier detected. Waiting for prompt. --> Don't know what to do! Starting pppd and hoping for the best. --> Starting pppd at Mon Jan 1 15:55:48 2018 --> Pid of pppd: 4608 --> Using interface ppp0 --> pppd: x▒ --> pppd: x▒ --> pppd: x▒ --> pppd: x▒ --> pppd: x▒ --> local IP address 100.68.71.79 --> pppd: x▒ --> remote IP address 10.64.64.64 --> pppd: x▒ --> primary DNS address 172.26.134.20 --> pppd: x▒ --> secondary DNS address 172.26.135.24 --> pppd: x▒ so it looks like it is connecting correctly to the ip 100.68.71.79 And when I do a **ping 100.68.71.79** it works correctly. But on any other addresses the ping is not working. I have checked the modem with the same sim on my windows and it was able to connect and surf the internet. Here is output of **sudo ifconfig** ppp0 Link encap:Point-to-Point Protocol inet addr:100.68.71.79 P-t-P:10.64.64.64 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1440 Metric:1 RX packets:9 errors:0 dropped:0 overruns:0 frame:0 TX packets:1245 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:3 RX bytes:186 (186.0 B) TX bytes:64913 (63.3 KiB) Output of **sudo iptables -L** Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination Output of **sudo route** Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default 100.68.71.79 0.0.0.0 UG 0 0 0 ppp0 10.64.64.64 * 255.255.255.255 UH 0 0 0 ppp0 192.168.1.0 * 255.255.255.0 U 0 0 0 eth0 here is the **pppd** info from /var/log/syslog Jan 1 16:00:22 localhost kernel: [10908.423138] option 1-1.2:1.0: GSM modem (1-port) converter detected Jan 1 16:00:22 localhost kernel: [10908.424115] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB0 Jan 1 16:00:22 localhost kernel: [10908.424991] usb-storage 1-1.2:1.1: USB Mass Storage device detected Jan 1 16:00:22 localhost kernel: [10908.425947] option 1-1.2:1.1: GSM modem (1-port) converter detected Jan 1 16:00:22 localhost kernel: [10908.426722] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB1 Jan 1 16:00:22 localhost kernel: [10908.427401] usb-storage 1-1.2:1.2: USB Mass Storage device detected Jan 1 16:00:22 localhost kernel: [10908.428406] option 1-1.2:1.2: GSM modem (1-port) converter detected Jan 1 16:00:22 localhost kernel: [10908.429176] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB2 Jan 1 16:01:02 localhost pppd: pppd 2.4.5 started by root, uid 0 Jan 1 16:01:02 localhost pppd: Using interface ppp0 Jan 1 16:01:02 localhost pppd: Connect: ppp0 /dev/ttyUSB0 Jan 1 16:01:02 localhost pppd: CHAP authentication succeeded Jan 1 16:01:02 localhost pppd: CHAP authentication succeeded Jan 1 16:01:07 localhost pppd: Could not determine remote IP address: defaulting to 10.64.64.64 Jan 1 16:01:07 localhost pppd: local IP address 100.68.71.79 Jan 1 16:01:07 localhost pppd: remote IP address 10.64.64.64 Jan 1 16:01:07 localhost pppd: primary DNS address 172.26.134.20 Jan 1 16:01:07 localhost pppd: secondary DNS address 172.26.135.24
unixdebian11 (63 rep)
Nov 3, 2018, 06:49 AM • Last activity: Dec 1, 2022, 09:46 PM
0 votes
1 answers
413 views
ppp as the primary interface with wifi as the backup
On Ubuntu 21.10, I have a cellular modem connected via USB that I need to be the primary interface on which all network traffic utilizes. However, I also need the wifi interface (in my case, `wlo1`) to also continue to work, and be the backup in case the ppp0 interface goes down. `ping google.com -I...
On Ubuntu 21.10, I have a cellular modem connected via USB that I need to be the primary interface on which all network traffic utilizes. However, I also need the wifi interface (in my case, wlo1) to also continue to work, and be the backup in case the ppp0 interface goes down. ping google.com -I ppp0 -> works through ppp ping google.com -I wlo1 -> works though wifi ping google.com -> works through ppp (this is the difficult part) I can get the cellular modem online just fine using pppd and corresponding scripts, and get a valid IP address. It's the routing I seem to be struggling with. What I've tried =============== pppd ---- I first tried utilizing options in the PPP script, options like defaultroute and replacedefaultroute. defaultroute does not alter the routing table and add a default route at all. Perhaps this is because, as I've come to learn, a routing table can only have one default route. Not sure. When trying to use the replacedefaultroute option, pppd does add a default entry into the main routing table, however, this winds up breaking both interfaces and I have no internet connection whatsoever. It does not remove the existing default route for wifi, thus there exist two default routes in the main routing table. Manually adding routes ---------------------- I then played around with adding routes to the main routing table manually. Whan I run sudo ip route add {ipAddress} dev ppp0 src {ipAddress}, then both interfaces work, but wifi is still the primary interface. Attempting to add that route with a metric lower than the wifi's metric also does not make it so that the ppp interface is primary (i.e. ping google.com still goes out via wifi). I can add a second default, but it must have a metric *higher* than wifi, else it causes both connections to stop working. A second routing table ---------------------- Following other stack exchange posts and articles like this one , I explored the option of having two routing tables and adding a route and a default route the second routing table. While this doesn't break either connection, even using a metric lower than the wifi's metric, the ppp interface still is not the primary interface. Also, if I disconnect from wifi, then the ppp interface stops working as well, and the 2nd routing table is cleared (is this NetworkManager doing this?) Questions ========= Is what I am trying to accomplish even possible? If so, what am I doing wrong? Am I fighting with NetworkManager? Any help is *greatly* appreciated!
smoothgrips (101 rep)
Dec 7, 2021, 11:42 PM • Last activity: Aug 1, 2022, 06:36 PM
1 votes
1 answers
1552 views
pppd says no ifupdown configuration found
I am using openfortivpn to connect to a remote network. Unfortunately the remote infrastructure has a **lot** of subnets, some of which conflict with my local ones. There are only a couple of subnets I need connectivity to (which don't have conflicts). It seems that openfortivpn only accepts all rou...
I am using openfortivpn to connect to a remote network. Unfortunately the remote infrastructure has a **lot** of subnets, some of which conflict with my local ones. There are only a couple of subnets I need connectivity to (which don't have conflicts). It seems that openfortivpn only accepts all routes or none from the gateway server. To address this, I added my own script in /etc/ppp/ip-up.d/9000-myvpnlink (-rwxr-xr-x) and a corresponding one in ip-down.d/: #!/bin/bash ip route add to 192.168.90.0/255.255.255.0 via $4 dev $0 ip route add to 192.168.92.0/255.255.255.0 via $4 dev $0 echo 1>/proc/sys/net/ipv4/ip_forward However the routes do not appear / forwarding is not enabled. When I check the logs I see... Oct 15 15:05:45 liv-i02-sg-ras NetworkManager: [1571148345.2093] device added (path: /sys/devices/virtual/net/ppp0, iface: ppp0): no ifupdown configuration found. How do I get my script to run? Is there a more sensible way to enable the routes?
symcbean (6301 rep)
Oct 15, 2019, 02:19 PM • Last activity: Jun 8, 2022, 10:00 AM
-1 votes
1 answers
110 views
How to connect to the four Ethernet ports on a wireless router?
Let's say we are happy with our typical wireless router. But one day we notice it has four LAN ports. We connect an Ethernet cable from one of them to our computer. On our computer do we use: * dhclient and the same SSID and password as we used for wireless? * pppoe and the same userid and password...
Let's say we are happy with our typical wireless router. But one day we notice it has four LAN ports. We connect an Ethernet cable from one of them to our computer. On our computer do we use: * dhclient and the same SSID and password as we used for wireless? * pppoe and the same userid and password our ISP gave us? * One of the above, with no username or password?
Dan Jacobson (560 rep)
Jun 2, 2022, 12:52 PM • Last activity: Jun 2, 2022, 03:51 PM
0 votes
1 answers
4118 views
create pty and connect it to a serial port /dev/ttyUSB0
**Problem:** I have two Linux machines connected with a serial interface. I use ppp to communicate between them (I have to since it is a project requirement). Communication speed is at 9600 bits/s. I need to measure bandwidth used, bits/s, live, i.e. while the system is running. Initially I thought...
**Problem:** I have two Linux machines connected with a serial interface. I use ppp to communicate between them (I have to since it is a project requirement). Communication speed is at 9600 bits/s. I need to measure bandwidth used, bits/s, live, i.e. while the system is running. Initially I thought I would use ifstat -btwTWS -i ppp0, since this is what the tools was designed for. However the value that was displayed was way more than 9600 bits/s. It hovered around 12.09 Kbits/s. I did ask why this happening , and the response was that it could be because of a compression. This does make sense. What I need, however, is actual bits/s after compression and before decompression happens. **My initial approach to solve this problem:** Initially I thought to use some sort of a serial traffic sniffer with a capability to display a data rate. I've tried several, but whenever I try to connect to /dev/ttyUSB0 I'm getting a resource busy error. This is happening because PPP is taking over the device. **My second approach to solve this problem:** I want to create a pseudo serial port, connect it to a real serial port. Then PPP will take over pseudo serial port and I will sniff the traffic on a real serial port. Here is the diagram:
--------------------         -------------------------  
|                  |         |                       |
|      PPP         |         |        sniffer        |
|  -------------   |         |   ------------------  |              
|  | /dev/pty0 |---|---------|---|  /dev/ttyUSB0  |  |
|  -------------   |         |   ------------------  |
|                  |         |                       |
--------------------         -------------------------
My understanding is that socat can do that. I've been reading up on this, but I coulnd't find any options that allow me to do that. **So here is my question:** How do I create a pseudoterminal with socat and connect to a real serial port? Is that even possible?
flashburn (691 rep)
Jan 9, 2019, 10:33 PM • Last activity: Nov 22, 2021, 02:05 AM
-1 votes
1 answers
5299 views
getting pppd "must be root" after setting whole fs with chmod 777
I have a process called `network_manager` which at some point runs a command `/usr/sbin/pppd`. everything works fine. But then, some files becomes unreadable on the file system and I use `sudo chmod -R 777 rootfs` in order to get access right. Once I run this command, the `network_manager` can no lo...
I have a process called network_manager which at some point runs a command /usr/sbin/pppd. everything works fine. But then, some files becomes unreadable on the file system and I use sudo chmod -R 777 rootfs in order to get access right. Once I run this command, the network_manager can no longer run /usr/sbin/pppd, I get an error : /usr/sbin/pppd: must be root to run /usr/sbin/pppd, since it is not setuid-root I dont get it, running chmod 777 isn't changing the owner of pppd so why it's no longer working ? it worked by setting chown root /usr/sbin/pppd chmod u+s /usr/sbin/pppd but I don't understand why
Lkaf Temravet (653 rep)
Jul 18, 2017, 09:16 AM • Last activity: Jul 2, 2021, 10:21 AM
1 votes
1 answers
1402 views
Run pppd automatically for incoming connections
I have my 1989 Mac SE/30 connecting into my Debian 10 router using PPP over a null modem USB RS232 adapter. When I want to connect I first have to SSH into debian from another machine and run ``` # pppd nodetach /dev/ttyUSB0 57600 -crtscts ``` Furthermore, if the Mac disconnects then `pppd` quits an...
I have my 1989 Mac SE/30 connecting into my Debian 10 router using PPP over a null modem USB RS232 adapter. When I want to connect I first have to SSH into debian from another machine and run
# pppd nodetach /dev/ttyUSB0 57600 -crtscts
Furthermore, if the Mac disconnects then pppd quits and in order to reconnect I have to do the same all over again. Is is possile to get pppd to listen on ttyUSB0 automatically? And to stay up? (All of the documentation I've found is intended for using PPP as a client for dial-up internet connections, not as a server.) **Update**
mini31 # pwd
/etc/systemd/network
mini31 # ls -l
total 4
-rw-r--r-- 1 root root 187 Jun 14 12:12 pppd-ttyUSB0.service
mini31 # cat pppd-ttyUSB0.service
[Service]
ExecStart=/usr/sbin/pppd nodetach /dev/ttyUSB0 57600 -crtscts
Restart=always
RestartSec=0

[Unit]
Description=pppd on ttyUSB0 for SE/30
After=network.target
Wants=network.target
mini31 # systemctl status pppd-ttyUSB0
Unit pppd-ttyUSB0.service could not be found.
mini31 #
**Update 2** Looks like /etc/systemd/system is the only folder that works. Furthermore, you have to:
# systemctl daemon-reload
mini31 # systemctl status pppd-ttyUSB0
● pppd-ttyUSB0.service - pppd on ttyUSB0 for Macs
   Loaded: loaded (/etc/systemd/system/pppd-ttyUSB0.service; static; vendor preset: enabled)
   Active: inactive (dead)
mini31 # systemctl enable pppd-ttyUSB0
The unit files have no installation config (WantedBy=, RequiredBy=, Also=,
Alias= settings in the [Install] section, and DefaultInstance= for template
units). This means they are not meant to be enabled using systemctl.

Possible reasons for having this kind of units are:
• A unit may be statically enabled by being symlinked from another unit's
  .wants/ or .requires/ directory.
• A unit's purpose may be to act as a helper for some other unit which has
  a requirement dependency on it.
• A unit may be started when needed via activation (socket, path, timer,
  D-Bus, udev, scripted systemctl call, ...).
• In case of template units, the unit is meant to be enabled with some
  instance name specified.
mini31 # systemctl start pppd-ttyUSB0
(Don't know what all that nonsense from enable is about.)
Richard Barraclough (550 rep)
Jun 14, 2021, 07:55 AM • Last activity: Jun 14, 2021, 11:39 AM
1 votes
1 answers
379 views
PPP fails LCP negotiation with serial to wifi connection using Socat
I'm trying to setup a connection over a serial to wifi adapter. I'm using Socat to create a socket to bridge the connection to a PTY for pppd. Data appears to be be flowing both directions, but pppd doesn't seem to be getting the response from the client. The debug output from Socat show incoming/ou...
I'm trying to setup a connection over a serial to wifi adapter. I'm using Socat to create a socket to bridge the connection to a PTY for pppd. Data appears to be be flowing both directions, but pppd doesn't seem to be getting the response from the client. The debug output from Socat show incoming/outgoing data, and the client debug output shows it's ACK'ing LCP negotiation packets from the server, but server debug only shows SENT packets and no reply. I've been banging my head against the wall for 2 weeks now trying to figure out what's going on. The client is a vintage DOS palmtop running dosppp and it works perfectly using a USB cable. My suspicion is that it's related to Socat, but I don't know how to debug if the received data is being passed to pppd. What am I missing? How can I get this to work? The Socat command I'm using is:
-d -d -v tcp-l:2323,fork,reuseaddr exec:'/usr/sbin/pppd notty',pty,rawer,nonblock=1,iexten=0,b19200
.ppprc
debug
nodetach
default-asyncmap
local
mtu 296
mru 296
noipv6
noauth
notty
Socat output:
root# socat -d -d -v tcp-l:2323,fork,reuseaddr exec:'/usr/sbin/pppd notty',pty,rawer,nonblock=1,iexten=0,b19200

2021/05/08 00:27:04 socat N listening on AF=2 0.0.0.0:2323
2021/05/08 00:27:20 socat N accepting connection from AF=2 10.0.10.46:26185 on AF=2 10.0.10.17:2323
2021/05/08 00:27:20 socat N forked off child process 1083
2021/05/08 00:27:20 socat N listening on AF=2 0.0.0.0:2323
2021/05/08 00:27:20 socat N forking off child, using pty for reading and writing
2021/05/08 00:27:20 socat N forked off child process 1084
2021/05/08 00:27:20 socat N forked off child process 1084
2021/05/08 00:27:20 socat N starting data transfer loop with FDs [6,6] and [5,5]
2021/05/08 00:27:20 socat N execvp'ing "/usr/sbin/pppd"
.~.~.~> 2021/05/08 00:27:26.128144  length=41 from=0 to=40
~.}#.!}!}!} }2}}$}!(}%}&}:}4@}}'}"}(}"%.~           > 2021/05/08 00:27:26.881958  length=50 from=41 to=90
~.}#.!}"}!} }8}}$}!(}"}&} } }  }%}&.sr.}'}"}(".} ~  .~> 2021/05/08 00:27:29.504403  length=41 from=91 to=131
~.}#.!}!}!} }2}}$}!(}%}&}:}4@}}'}"}(}"%.~           > 2021/05/08 00:27:30.154487  length=50 from=132 to=181
~.}#.!}"}!} }8}}$}!(}"}&} } }  }%}&.sr.}'}"}(".} ~  .~> 2021/05/08 00:27:33.004495  length=50 from=182 to=231
~.}#.!}"}!} }8}}$}!(}"}&} } }  }%}&.sr.}'}"}(".} ~  > 2021/05/08 00:27:33.329502  length=41 from=232 to=272
~.}#.!}!}!} }2}!}}!(}%}&}:}4@} }}"}(}"%.~           .~> 2021/05/08 00:27:36.056441  length=50 from=273 to=322
~.}#.!}"}!} }8}}$}!(}"}&} } }  }%}&.sr.}'}"}(".} ~  > 2021/05/08 00:27:36.679459  length=41 from=323 to=363
~.}#.!}!}!} }2}}$}!(}%}&}:}4@}}'}"}(}"%.~           .~> 2021/05/08 00:27:39.054527  length=50 from=364 to=413
~.}#.!}"}!} }8}}$}!(}"}&} } }  }%}&.sr.}'}"}(".} ~  > 2021/05/08 00:27:39.655287  length=41 from=414 to=454
~.}#.!}!}!} }2}}$}!(}%}&}:}4@}}'}"}(}"%.~           .~> 2021/05/08 00:27:42.079453  length=50 from=455 to=504
~.}#.!}"}!} }8}}$}!(}"}&} } }  }%}&.sr.}'}"}(".} ~  > 2021/05/08 00:27:43.029525  length=41 from=505 to=545
~.}#.!}!}!} }2}}$}!(}%}&}:}4@}}'}"}(}"%.~           .~> 2021/05/08 00:27:45.079471  length=50 from=546 to=595
~.}#.!}"}!} }8}}$}!(}"}&} } }  }%}&.sr.}'}"}(".} ~  > 2021/05/08 00:27:46.279660  length=41 from=596 to=636
~.}#.!}!}!} }2}}$}!(}%}&}:}4@}}'}"}(}"%.~           .~> 2021/05/08 00:27:48.054620  length=50 from=637 to=686
~.}#.!}"}!} }8}}$}!(}"}&} } }  }%}&.sr.}'}"}(".} ~  > 2021/05/08 00:27:49.554776  length=41 from=687 to=727
~.}#.!}!}!} }2}}$}!(}%}&}:}4@}}'}"}(}"%.~             2021/05/08 00:27:50 socat N read(5, 0x11f15c8, 8192): Input/output error (probably PTY closed)
2021/05/08 00:27:50 socat N socket 2 (fd 5) is at EOF
2021/05/08 00:27:50 socat E waitpid(): child 1084 exited with status 16
2021/05/08 00:27:50 socat N exit(1)
2021/05/08 00:27:50 socat N childdied(): handling signal 17
2021/05/08 00:27:50 socat N childdied(): handling signal 17
2021/05/08 00:28:42 socat N socat_signal(): handling signal 2
2021/05/08 00:28:42 socat N exiting on signal 2
2021/05/08 00:28:42 socat N socat_signal(): finishing signal 2
2021/05/08 00:28:42 socat N exit(130)
Syslog
May  8 00:27:20  pppd: pppd 2.4.7 started by pi, uid 0
May  8 00:27:20  pppd: using channel 2
May  8 00:27:20  pppd: Using interface ppp0
May  8 00:27:20  pppd: Connect: ppp0  /dev/pts/2
May  8 00:27:20  pppd: sent [LCP ConfReq id=0x1     ]
May  8 00:27:23  pppd: sent [LCP ConfReq id=0x1     ]
May  8 00:27:26  pppd: sent [LCP ConfReq id=0x1     ]
May  8 00:27:29  pppd: sent [LCP ConfReq id=0x1     ]
May  8 00:27:32  pppd: sent [LCP ConfReq id=0x1     ]
May  8 00:27:35  pppd: sent [LCP ConfReq id=0x1     ]
May  8 00:27:38  pppd: sent [LCP ConfReq id=0x1     ]
May  8 00:27:41  pppd: sent [LCP ConfReq id=0x1     ]
May  8 00:27:44  pppd: sent [LCP ConfReq id=0x1     ]
May  8 00:27:47  pppd: sent [LCP ConfReq id=0x1     ]
May  8 00:27:50  pppd: LCP: timeout sending Config-Requests
May  8 00:27:50  pppd: Connection terminated.
May  8 00:27:50  pppd: Modem hangup
May  8 00:27:50  pppd: Waiting for 1 child processes...
May  8 00:27:50  pppd:   script pppd (charshunt), pid 1085
May  8 00:27:50  pppd: Script pppd (charshunt) finished (pid 1085), status = 0x0
May  8 00:27:50  pppd: Exit.
Client debug output:
sent [LCP ConfReq id=0x1    ]
fsm_sdata(LCP): Sent code 1, id 1.
Timeout 53ce:2a06 in 3 seconds.
LCP: sending Configure-Request, id 1
rcvd [LCP ConfReq id=0x1    ]
fsm_rconfreq(LCP): Rcvd id 1.
lcp_reqci: rcvd MRU (296) (ACK)
lcp_reqci: rcvd MAGICNUMBER (99ed93e8) (ACK)
lcp_reqci: rcvd PCOMPRESSION (ACK)
lcp_reqci: rcvd ACCOMPRESSION (ACK)
lcp_reqci: returning CONFACK.
sent [LCP ConfAck id=0x1    ]
fsm_sdata(LCP): Sent code 2, id 1.
rcvd [LCP ConfReq id=0x1    ]
fsm_rconfreq(LCP): Rcvd id 1.
lcp_reqci: rcvd MRU (296) (ACK)
lcp_reqci: rcvd MAGICNUMBER (99ed93e8) (ACK)
lcp_reqci: rcvd PCOMPRESSION (ACK)
lcp_reqci: rcvd ACCOMPRESSION (ACK)
lcp_reqci: returning CONFACK.
sent [LCP ConfAck id=0x1    ]
fsm_sdata(LCP): Sent code 2, id 1.
calltimeout, calling 53ce:2a06.
sent [LCP ConfReq id=0x1    ]
fsm_sdata(LCP): Sent code 1, id 1.
Timeout 53ce:2a06 in 3 seconds.
LCP: sending Configure-Request, id 1
rcvd [LCP ConfReq id=0x1    ]
fsm_rconfreq(LCP): Rcvd id 1.
lcp_reqci: rcvd MRU (296) (ACK)
lcp_reqci: rcvd MAGICNUMBER (99ed93e8) (ACK)
lcp_reqci: rcvd PCOMPRESSION (ACK)
lcp_reqci: rcvd ACCOMPRESSION (ACK)
lcp_reqci: returning CONFACK.
sent [LCP ConfAck id=0x1    ]
fsm_sdata(LCP): Sent code 2, id 1.
calltimeout, calling 53ce:2a06.
sent [LCP ConfReq id=0x1    ]
fsm_sdata(LCP): Sent code 1, id 1.
Timeout 53ce:2a06 in 3 seconds.
LCP: sending Configure-Request, id 1
rcvd [LCP ConfReq id=0x1    ]
fsm_rconfreq(LCP): Rcvd id 1.
lcp_reqci: rcvd MRU (296) (ACK)
lcp_reqci: rcvd MAGICNUMBER (99ed93e8) (ACK)
lcp_reqci: rcvd PCOMPRESSION (ACK)
lcp_reqci: rcvd ACCOMPRESSION (ACK)
lcp_reqci: returning CONFACK.
sent [LCP ConfAck id=0x1    ]
fsm_sdata(LCP): Sent code 2, id 1.
calltimeout, calling 53ce:2a06.
sent [LCP ConfReq id=0x1    ]
fsm_sdata(LCP): Sent code 1, id 1.
Timeout 53ce:2a06 in 3 seconds.
LCP: sending Configure-Request, id 1
rcvd [LCP ConfReq id=0x1    ]
fsm_rconfreq(LCP): Rcvd id 1.
lcp_reqci: rcvd MRU (296) (ACK)
lcp_reqci: rcvd MAGICNUMBER (99ed93e8) (ACK)
lcp_reqci: rcvd PCOMPRESSION (ACK)
lcp_reqci: rcvd ACCOMPRESSION (ACK)
lcp_reqci: returning CONFACK.
sent [LCP ConfAck id=0x1    ]
fsm_sdata(LCP): Sent code 2, id 1.
calltimeout, calling 53ce:2a06.
sent [LCP ConfReq id=0x1    ]
fsm_sdata(LCP): Sent code 1, id 1.
Timeout 53ce:2a06 in 3 seconds.
LCP: sending Configure-Request, id 1
rcvd [LCP ConfReq id=0x1    ]
fsm_rconfreq(LCP): Rcvd id 1.
lcp_reqci: rcvd MRU (296) (ACK)
lcp_reqci: rcvd MAGICNUMBER (99ed93e8) (ACK)
lcp_reqci: rcvd PCOMPRESSION (ACK)
lcp_reqci: rcvd ACCOMPRESSION (ACK)
lcp_reqci: returning CONFACK.
sent [LCP ConfAck id=0x1    ]
fsm_sdata(LCP): Sent code 2, id 1.
calltimeout, calling 53ce:2a06.
sent [LCP ConfReq id=0x1    ]
fsm_sdata(LCP): Sent code 1, id 1.
Timeout 53ce:2a06 in 3 seconds.
LCP: sending Configure-Request, id 1
calltimeout, calling 53ce:2a06.
sent [LCP ConfReq id=0x1    ]
fsm_sdata(LCP): Sent code 1, id 1.
Timeout 53ce:2a06 in 3 seconds.
LCP: sending Configure-Request, id 1
calltimeout, calling 53ce:2a06.
sent [LCP ConfReq id=0x1    ]
fsm_sdata(LCP): Sent code 1, id 1.
Timeout 53ce:2a06 in 3 seconds.
LCP: sending Configure-Request, id 1
calltimeout, calling 53ce:2a06.
sent [LCP ConfReq id=0x1    ]
fsm_sdata(LCP): Sent code 1, id 1.
Timeout 53ce:2a06 in 3 seconds.
LCP: sending Configure-Request, id 1
calltimeout, calling 53ce:2a06.
sent [LCP ConfReq id=0x1    ]
fsm_sdata(LCP): Sent code 1, id 1.
Timeout 53ce:2a06 in 3 seconds.
LCP: sending Configure-Request, id 1
calltimeout, calling 53ce:2a06.
LCP: timeout sending Config-Requests
**Update:** I've previously already tried wireshark, other than digging into the packets to see the data, the contents are the same as the output of Socat with the -v option. Also have tried
socat PTY,link=/tmp/ptya,rawer,nonblock=1,b19200,waitslave tcp-l:2323,fork,reuseaddr

od -ah readlink /tmp/ptya
The LCP packets are correct (per PPP Design-Implementation-Debugging_James-Carlson). The problem still appears like pppd is not getting the client packets, but they are being received by socat. I did this without starting ppp on the server.
root# od -h --endian=big readlink /tmp/ptya

# Every 7D XX sequence should be replaced with XX xor 20 (hex)

0000000 7eff 7d23 c021 7d21 7d21 7d20 7d32 7d7d
0000020 227d 287d 2256 6c7e 7eff 7d23 c021 7d21
0000040 7d21 7d20 7d32 7d7d 247d 2128 7d25 7d26
0000060 7d22 6791 2b7d 7d22 7d28 7d22 566c 7e7e
0000100 ff7d 23c0 217d 217d 217d 207d 327d 7d24
0000120 7d21 287d 257d 267d 2267 912b 7d7d 227d
0000140 287d 2256 6c7e 7eff 7d23 c021 7d21 7d21
0000160 7d20 7d32 7d7d 247d 2128 7d25 7d26 7d22
0000200 6791 2b7d 7d22 7d28 7d22 566c 7e7e ff7d
0000220 23c0 217d 217d 217d 207d 327d 7d24 7d21
0000240 287d 257d 267d 2267 912b 7d7d 227d 287d
0000260 2256 6c7e 7eff 7d23 c021 7d21 7d21 7d20
0000300 7d32 7d7d 247d 2128 7d25 7d26 7d22 6791
0000320 2b7d 7d22 7d28 7d22 566c 7e7e ff7d 23c0
0000340 217d 217d 217d 207d 327d 7d24 7d21 287d
0000360 257d 267d 2267 912b 7d7d 227d 287d 2256
0000400 6c7e 7eff 7d23 c021 7d21 7d21 7d20 7d32
0000420 7d7d 247d 2128 7d25 7d26 7d22 6791 2b7d
0000440 7d22 7d28 7d22 566c 7e7e ff7d 23c0 217d
0000460 217d 217d 207d 327d 7d24 7d21 287d 257d
0000500 267d 2267 912b 7d7d 227d 287d 2256 6c7e
0000520 7eff 7d23 c021 7d21 7d21 7d20 7d32 7d7d
0000540 247d 2128 7d25 7d26 7d22 6791 2b7d 7d22
Trying to use the kdebug option, but again syslog is not showing any packets being received by ppp. **UPDATE 2:** The problem definitely appears something to do with socat. I can connect directly with a serial cable and very quickly get a ppp connection, BUT, if I link a PTY to the serial port and then try to connect to ppp using the PTY, it fails *exactly* the same way. PPP server only shows 'sent' messages, nothing received. Socat is preventing PPP server from getting replies from client *somehow*, or ppp is looking to receive from somewhere else. This also helps explain why kdebug is not showing packets received for ppp, but does not explain why other apps connected thru socat show data being received. Here are the commands I tried that failed:
socat -d -d -v file:/dev/ttyUSB0,nonblock,rawer PTY,rawer,link=/tmp/ptya
pppd readlink /tmp/ptya
Biyau (11 rep)
May 9, 2021, 02:29 AM • Last activity: May 12, 2021, 01:11 AM
2 votes
1 answers
1667 views
Configuring pppd to accept link-local IPv6 address from remote peer
I have two Raspberry Pis with their serial ports connected to each other. I have established a PPP link between the two of them and successfully ICMPV6 pinged and opened TCP sockets between them. But I can't work out how to get the 'client' pppd to accept the link-local IPv6 address provided by the...
I have two Raspberry Pis with their serial ports connected to each other. I have established a PPP link between the two of them and successfully ICMPV6 pinged and opened TCP sockets between them. But I can't work out how to get the 'client' pppd to accept the link-local IPv6 address provided by the 'server' pppd. I am trying to use static addresses so I know the link-local IP address of the remote peer. On the 'server' I am running:
pppd file ./ppp-options ipv6 ::1,::2 /dev/ttyAMA0 115200
And on the 'client', I am running:
pppd file ./ppp-options ipv6cp-accept-local /dev/ttyAMA0 115200
However the ipv6cp-accept-local option doesn't seem to work as the [man page](https://man.cx/pppd(1)) describes: > With this option, pppd will accept the peer's idea of our local IPv6 interface > identifier, even if the local IPv6 interface identifier was specified in an option. The 'client' machine is instead using a randomly assigned link local address:
Using interface ppp0
Connect: ppp0  /dev/ttyAMA0
Deflate (15) compression enabled
local  LL address fe80::fd28:565e:1186:02ff
remote LL address fe80::0000:0000:0000:0001
The full output with debug turned on the client is here: https://gist.github.com/njh/ab3282f43c72dcf6932b3693eb7dfca4 And this is my configuration file (used by both):
nodetach
noauth
persist
local
noip
+ipv6
I am running Raspberry Pi OS, which has pppd version *2.4.7* installed on both devices.
njh (143 rep)
Feb 12, 2021, 12:58 AM • Last activity: Feb 19, 2021, 12:49 AM
0 votes
1 answers
69 views
PPP connection from Mac System 7 to Debian 10
I have a Mac SE/30 that I want to connect via PPP to Debian 10 and, in turn, access the Internet -- as if it was dial-up. I can successfully send text over a null modem link and now I want to make a PPP connection over the same link. The SE/30 is running System 7.5.5 with OpenTransport 1.1.2 and the...
I have a Mac SE/30 that I want to connect via PPP to Debian 10 and, in turn, access the Internet -- as if it was dial-up. I can successfully send text over a null modem link and now I want to make a PPP connection over the same link. The SE/30 is running System 7.5.5 with OpenTransport 1.1.2 and the _Config PPP_ control panel. On Debian 10 this happens:
mini31 # pppd nodetach debug /dev/ttyUSB0 9600
using channel 10
Using interface ppp0
Connect: ppp0  /dev/ttyUSB0
rcvd [LCP ConfReq id=0x42 ]
sent [LCP ConfReq id=0x1     ]
sent [LCP ConfAck id=0x42 ]
sent [LCP ConfReq id=0x1     ]
rcvd [LCP ConfReq id=0x43 ]
sent [LCP ConfAck id=0x43 ]
rcvd [LCP ConfReq id=0x44 ]
sent [LCP ConfAck id=0x44 ]
sent [LCP ConfReq id=0x1     ]
sent [LCP ConfReq id=0x1     ]
rcvd [LCP ConfReq id=0x45 ]
sent [LCP ConfAck id=0x45 ]
sent [LCP ConfReq id=0x1     ]
rcvd [LCP ConfReq id=0x46 ]
sent [LCP ConfAck id=0x46 ]
rcvd [LCP ConfReq id=0x47 ]
sent [LCP ConfAck id=0x47 ]
sent [LCP ConfReq id=0x1     ]
sent [LCP ConfReq id=0x1     ]
rcvd [LCP ConfReq id=0x48 ]
sent [LCP ConfAck id=0x48 ]
rcvd [LCP ConfReq id=0x49 ]
sent [LCP ConfAck id=0x49 ]
sent [LCP ConfReq id=0x1     ]
sent [LCP ConfReq id=0x1     ]
rcvd [LCP ConfReq id=0x4a ]
sent [LCP ConfAck id=0x4a ]
rcvd [LCP ConfReq id=0x4b ]
sent [LCP ConfAck id=0x4b ]
sent [LCP ConfReq id=0x1     ]
LCP: timeout sending Config-Requests
Connection terminated.
My guess is that Debian is expecting the Mac to send LCP ConfAck but it is not doing. However, I don't understand what this means. Any ideas on how to get it working? **Edit** The Mac appears to be sending repeated configure requests for the magic number parameter even though Debian is sending accepts for them. Similarly, the Mac is not replying to Debian's configure requests. I wonder whether the Mac isn't receiving data; could be a problem with the physical connection between USB on Debian and Mac's RS422?
Richard Barraclough (550 rep)
Dec 23, 2020, 11:47 AM • Last activity: Dec 23, 2020, 05:24 PM
1 votes
2 answers
1167 views
Transparently bridge network over serial link
I have two Linux devices - for simplicity let's call them Raspberry Pi's - in a box that I want to connect to a network with a singe Ethernet link. Both of them need to be accessible, individually, on the network. I can join one to the other through a serial port very easily. It looks like `pppd` or...
I have two Linux devices - for simplicity let's call them Raspberry Pi's - in a box that I want to connect to a network with a singe Ethernet link. Both of them need to be accessible, individually, on the network. I can join one to the other through a serial port very easily. It looks like pppd or slip may be the answer, however all the examples I've seen so far use fixed configurations which is no use to me - **both** boards need to be able to take on **any** IP address either via DHCP or manually configured, independent of configuration on the other. This feels like it should be fairly easy to accomplish with Linux but either I'm not finding the right info or I'm using the wrong terms while searching. Any thoughts appreciated.
John U (344 rep)
Oct 15, 2020, 09:15 AM • Last activity: Oct 18, 2020, 01:58 PM
1 votes
0 answers
1748 views
How to allow SSH over PPP?
I have these two computers connected through ppp. One has ip `10.10.0.1` and the other has ip `10.10.0.2`. Both also have the interface `ppp0` with netmask `255.255.255.255`: ``` # ifconfig ppp0: flags=4305 mtu 1500 inet 10.10.0.2 netmask 255.255.255.255 destination 10.10.0.1 ppp txqueuelen 3 (Point...
I have these two computers connected through ppp. One has ip 10.10.0.1 and the other has ip 10.10.0.2. Both also have the interface ppp0 with netmask 255.255.255.255:
# ifconfig
ppp0: flags=4305  mtu 1500
        inet 10.10.0.2  netmask 255.255.255.255  destination 10.10.0.1
        ppp  txqueuelen 3  (Point-to-Point Protocol)
        RX packets 7  bytes 105 (105.0 B)
        RX errors 3  dropped 0  overruns 0  frame 0
        TX packets 20  bytes 1522 (1.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
How can I make it possible to connect from 10.10.0.2 into 10.10.0.1 using SSH? If I make:
# ssh -vv root@10.10.0.1
I can see that it gets frozen at:
.
.
.
password: 
debug2: input_userauth_info_req
debug2: input_userauth_info_req: num_prompts 0
debug1: Authentication succeeded (keyboard-interactive).
Authenticated to 10.10.0.1 ([10.10.0.1]:22).
debug1: channel 0: new [client-session]
debug2: channel 0: send open
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: pledge: network
Watching everything from tcpdump I see this:
# tcpdump -i ppp0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ppp0, link-type LINUX_SLL (Linux cooked), capture size 262144 bytes
22:15:48.592651 IP tlcmelo > 10.100.0.1: ICMP echo request, id 17288, seq 1, length 64
22:15:48.942907 IP 10.100.0.1 > tlcmelo: ICMP echo reply, id 17288, seq 1, length 64
22:15:49.593728 IP tlcmelo > 10.100.0.1: ICMP echo request, id 17288, seq 2, length 64
22:15:49.821594 IP 10.100.0.1 > tlcmelo: ICMP echo reply, id 17288, seq 2, length 64
22:15:50.595483 IP tlcmelo > 10.100.0.1: ICMP echo request, id 17288, seq 3, length 64
22:15:50.840112 IP 10.100.0.1 > tlcmelo: ICMP echo reply, id 17288, seq 3, length 64
22:15:51.597014 IP tlcmelo > 10.100.0.1: ICMP echo request, id 17288, seq 4, length 64
22:16:00.105020 IP tlcmelo.57621 > 10.100.0.1.57621: UDP, length 44
22:16:38.104153 IP tlcmelo.57621 > 10.100.0.1.57621: UDP, length 44
22:17:04.490191 IP tlcmelo.37489 > 239.255.255.250.1900: UDP, length 171
22:17:05.490773 IP tlcmelo.37489 > 239.255.255.250.1900: UDP, length 171
22:17:06.491775 IP tlcmelo.37489 > 239.255.255.250.1900: UDP, length 171
22:17:07.492280 IP tlcmelo.37489 > 239.255.255.250.1900: UDP, length 171
22:17:16.104112 IP tlcmelo.57621 > 10.100.0.1.57621: UDP, length 44
22:17:54.103994 IP tlcmelo.57621 > 10.100.0.1.57621: UDP, length 44
22:18:32.105034 IP tlcmelo.57621 > 10.100.0.1.57621: UDP, length 44
-------- Edit 1: @derobert, thanks for your message: It is not possible also to ssh from 10.10.0.1 back to 10.10.0.2, same issue actually. I tried a smaller MTU, no success unfortunately. @pizdelect, thanks for your message: I am running debian in both computers. I tried setting MTU to 1000 and 500, no success yet. Edit 2: In the 10.10.0.1, doing iptables -vL I see these: Chain Block (2 references) pkts bytes target prot opt in out source destination 75 3210 LOG all -- any any anywhere !0.0.0.255/-1 limit: avg 3/hour burst 5 LOG level warning prefix "Iptables: Block: " 6 360 REJECT tcp -- any any anywhere anywhere reject-with tcp-reset 2433 143K REJECT udp -- any any anywhere anywhere reject-with icmp-port-unreachable 0 0 DROP all -- any any anywhere anywhere Is that possible that it is blocking the connection?
Thiago Melo (111 rep)
Mar 13, 2019, 09:29 PM • Last activity: Jul 24, 2019, 02:09 PM
1 votes
0 answers
307 views
Filter PPPoE packets
Can you somehow inspect PPPoE packets and then filter them with iptables or other tools? PPPoE is below ipv4 so I can't use iptables directly.
Can you somehow inspect PPPoE packets and then filter them with iptables or other tools? PPPoE is below ipv4 so I can't use iptables directly.
superchan (11 rep)
Mar 27, 2019, 12:42 PM
0 votes
1 answers
1013 views
using PPP without TCP/IP
I'm using a PPP to communicate with a device. So far what I have been doing is instantiating PPP on my machine (Fedora 29) and on the device (Yocto Linux). Then I open a TCP/UDP socket and communicate with the device. My serial link (which is why I use PPP) has low baud rate, 4800 to be exact. I can...
I'm using a PPP to communicate with a device. So far what I have been doing is instantiating PPP on my machine (Fedora 29) and on the device (Yocto Linux). Then I open a TCP/UDP socket and communicate with the device. My serial link (which is why I use PPP) has low baud rate, 4800 to be exact. I cannot change it, it is a project requirement. I've been doing some reading about PPP and as far as I understand I can't just instantiate it and use it raw. I'm have to use TCP/IP/UDP. Am I correct? In other words once I have a PPP connection the only way to use is to open a socket (UDP or TCP) and talk to the device through it. I can't just create my application level packet and tell PPP to send it, I have to go through TCP/IP layer (transport layer).
flashburn (691 rep)
Feb 6, 2019, 10:24 PM • Last activity: Feb 6, 2019, 10:55 PM
Showing page 1 of 20 total questions