The Linux ADSL / WiFi Router ...

I’ve been using various routers for WiFi and ADSL for years and they’ve sort of been Ok, but recently my Thompson Speedtouch Router seems to’ve been having all manner of problems, and neither replacing the router or upgrading the BIOS seem to have had any effect. So, what about just using a Linux PC?

Here’s what you need;

a. Linux PC running Ubuntu 11.10
b. One of these for ADSL (http://linitx.com/product/12181)
c. An ASUS PCE-N13 802.11 b/g/n or similar for WiFi

To make it run, add the bridge utils package and the hostapd package.

Your /etc/network/interfaces file will need to look like this;

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual
metric 0

auto eth1
iface eth1 inet manual
metric 0

auto wlan0
iface wlan0 inet manual
metric 0

auto br0
iface br0 inet dhcp
        bridge_ports eth0 eth1 wlan0
        bridge_fd 0
        bridge_stp off
        metric 1

Then you will need to create a hostapd configuration in /etc/hostapd/hostapd.conf like this;

# Access Point Definition
interface=wlan0
ssid=<your SSID>
channel=1
driver=nl80211
country_code=UK
ieee80211d=1
hw_mode=g
beacon_int=100
dtim_period=2
max_num_sta=255
auth_algs=2
wep_default_key=0
wep_key0=0123450000

And modify your /etc/default/hostapd so that it starts;

DAEMON_CONF="/etc/hostapd/hostapd.conf"
DAEMON_OPTS="-tK"

If you reboot your machine, all you need to do is configure your ADSL and you’re off. So point your browser at 192.168.0.2, password “admin” then enter your ADSL username, password, VPI=0, VCI=34 and Encapsulation=PPoa/VcMUX … and you should be good to go.

… I plugged this up here this morning, works fine, although I might get a larger Ariel for the WiFi card. If anything it seems quicker and smoother that my Speedtouch ever was. This is what I’m getting from the ADSL stats page;

[smg id=1504 type=full]

Don’t you need some iptable rules to take care of Network Address Translation, firewall, and inbound connections such as SSH etc. ?

Any reason you didn’t go for Smoothwall, Redwall, etc ?

Don’t you need some iptable rules to take care of Network Address Translation, firewall, and inbound connections such as SSH etc.

Nope.

Any reason you didn’t go for Smoothwall, Redwall, etc ?

Not needed.

The ADSL PCI card is actually a router on a card, so it does NAT, DMZ’s etc, all available via a browser.
You “can” add firewall stuff if you need it, but generally the NAT on the card will handle it.
(I’m sure “I” will add some eventually, but generally it’ll work securely as-is in most instances)

The beauty of this solution is that the card presents as a standard network interface, so there are no flakey ADSL drivers to worry about.
Once you bridge your WiFi nic, Local nic and ADSL card, essentially you have one network which is all “inside” the ADSL router’s NAT, and the entire network (wired and wireless) feeds off the DHCP server that sits on the ADSL card.

:slight_smile:

If I stuck a dedicated router distro on there, I wouldn’t be able to use my Ubuntu desktop … :wink:

It’s now 9pm, probably peak time … I have 10 active VPN connections running and 10 remote gkrellm sessions running over the ADSL.
This is a 30 packet ping against linux.co.uk;

--- linux.co.uk ping statistics ---
30 packets transmitted, 30 received, 0% packet loss, time 29042ms
rtt min/avg/max/mdev = 21.847/22.245/22.829/0.321 ms

Not only is it quick, but note the consistency!

Mmm … impressive, and interesting :slight_smile: … I had meant to chuck that in as a question … whether it was a dedicated box, or if it was still a usable desktop … now I know, the Smoothwall question is obviously redundant.

Certainly worth bearing in mind …

Oooo … that sounds handy … slightly off topic, but any chance of explaining how to set up a remote GKrellM session ?

Yup, on the server;

apt-get install gkrellmd
edit /etc/gkrellmd.conf
make sure you have allow-host set to let you in (!)
read the notes and adjust accordingly, for WAN links I recommend update-hz 1

On the client;

apt-get install gkrellm
gkrellm -s <remote host ip>

Owzat?

If you grab the extended themes, set your theme to be “CoplandOS”, width 100, 2 Krell updates per sec.
Set remember location and don’t show in pager or taskbar.
I also turn down the font size and change the face to verdana …

[smg id=1505 type=preview]