Skip to content

Serial network routing via ppp

Florian Fuchs edited this page Jun 22, 2026 · 1 revision

rj45jack reported on how to make serial connection to the internet working, so you can use a internet connection with your dreamcast, without any lan adapter, but using ppp over serial:

I simplified the serial connection into a single shell script. This goes on your workstation.

#!/bin/bash

# 1. Configuration Variables
SERIAL_PORT="/dev/ttyUSB0"
BAUD_RATE="115200"
LOCAL_IP="10.99.99.1"
REMOTE_IP="10.99.99.2"
# Automatically detect your active internet interface (e.g., enp34s0 or wlo1)
WAN_INTERFACE=$(ip route | grep default | awk '{print $5}' | head -n 1)

echo "=== Dreamcast Serial Routing Initialization ==="
echo "Detected Internet Interface: $WAN_INTERFACE"

# 2. Clear Stale Lock Files
echo "[*] Clearing any stale serial locks..."
sudo rm -f /var/lock/LCK..ttyUSB*

# 3. Enable Kernel IP Forwarding
echo "[*] Enabling IPv4 forwarding..."
sudo sysctl -w net.ipv4.ip_forward=1 > /dev/null

# 4. Flush Old IPTables Rules & Set NAT Masquerading
echo "[*] Configuring IPTables NAT rules..."
sudo iptables -F
sudo iptables -t nat -F
sudo iptables -t nat -A POSTROUTING -o "$WAN_INTERFACE" -j MASQUERADE
sudo iptables -A FORWARD -i ppp0 -o "$WAN_INTERFACE" -j ACCEPT
sudo iptables -A FORWARD -i "$WAN_INTERFACE" -o ppp0 -m state --state RELATED,ESTABLISHED -j ACCEPT

# 5. Launch PPP Daemon
echo "[*] Launching pppd on $SERIAL_PORT at $BAUD_RATE..."
echo "[*] Awaiting handshake from Dreamcast..."
echo "------------------------------------------------"

sudo pppd "$SERIAL_PORT" "$BAUD_RATE" "${LOCAL_IP}:${REMOTE_IP}" \
    proxyarp \
    local \
    noauth \
    nodetach \
    debug \
    dump

On the Dreamcast a single line command:

pppd /dev/ttySC1 115200 local noauth nodetach

Almost forgot this: route add default gw 10.99.99.1 You'll need this to get out.

And you should be online. You can play with the baud rates quite a bit. I had 500k set and it seemed OK. Latency through my setup is ~7.5ms. Which is about a 60x decrease over the Dial-Up modem (ha!).

Image Image Image

Clone this wiki locally