Linux ADSL Modem Replacement: Configuring Dial-Up PPP Connection as ISP Gateway


2 views

First, let's clarify why your scenario won't work as-is with ADSL. Traditional dial-up modems (POTS/V.90/V.92) operate on analog signals at 56Kbps max, while ADSL uses digital signals on different frequency bands (up to 24Mbps downstream). The physical layer protocols are fundamentally incompatible.

For your Linux box to replace the ISP's modem, consider these approaches:

// Checking available PPP devices
ls /dev/ | grep modem
// Typical output for serial modem:
// ttyS0  (COM1 equivalent)
// ttyS1  (COM2 equivalent)

If you insist on dial-up (though speeds will be painfully slow), here's a basic wvdial configuration:

# /etc/wvdial.conf
[Dialer Defaults]
Modem = /dev/ttyS0
Baud = 115200
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ISDN = 0
Modem Type = Analog Modem
Phone = your_isp_dialup_number
Username = your_username
Password = your_password

Once connected via PPP, configure NAT for sharing:

# Enable IP forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward

# Basic iptables NAT rules
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
iptables -A FORWARD -i ppp0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i eth0 -o ppp0 -j ACCEPT

Instead of trying to use the dial-up modem, consider:

  1. Purchase a USB ADSL modem (look for models with Linux drivers)
  2. Configure bridge mode on your existing ISP modem
  3. Use a Raspberry Pi as a PPPoE client

If you obtain compatible hardware, the setup would look like:

# Install PPPoE client
sudo apt install pppoeconf

# Configure PPPoE
sudo pppoeconf

# (Follow interactive setup for ISP credentials)

The fundamental difference between dial-up and ADSL modems lies in their physical layer implementations. Traditional dial-up modems (V.90/V.92) use analog frequencies (0-4kHz) with maximum 56Kbps speeds, while ADSL utilizes higher frequency bands (25kHz-1.1MHz) enabling simultaneous voice and data with speeds up to 24Mbps.

First verify your modem's capabilities:

lsusb | grep -i modem
# OR for PCI modems:
lspci -vnn | grep -i communication

Common compatible models include:

  • US Robotics 56K Faxmodem (pctel, slmodem drivers)
  • Lucent Winmodem (ltmodem driver)
  • Connexant HSF/HCF chipsets (hsfmodem)

Install required packages:

sudo apt-get install ppp wvdial

Basic /etc/wvdial.conf setup:

[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = Analog Modem
ISDN = 0
Phone = your_isp_number
Username = your_username
Password = your_password
Modem = /dev/ttyACM0
Baud = 115200
Stupid Mode = 1

Configure IP forwarding and NAT after establishing PPP connection:

sudo sysctl -w net.ipv4.ip_forward=1
sudo iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
sudo iptables -A FORWARD -i ppp0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i eth0 -o ppp0 -j ACCEPT

Expect significant speed differences:

Metric Dial-up ADSL
Latency 150-300ms 10-40ms
Download ≤56Kbps 1-24Mbps
Upload ≤33Kbps 384Kbps-1Mbps

If your ISP supports it, consider:

# PPPoE Configuration
sudo apt install pppoeconf
sudo pppoeconf

For ADSL modem emulation, specialized hardware like:

  • Dragonfly BSD's ng_pppoe kernel module
  • Linux ATM stack (br2684ctl) with ADSL NIC