Bridging vs Internet Connection Sharing

I got a new DVD player (It’s a Samsung Blu-Ray player and includes an Ethernet port on the back for access to Internet-based services such as Netflix and Youtube — it’s sweet — I’m very happy with it). However it needs internet access via ethernet. I figured an old laptop with a wireless card and ethernet adapter is perfect. There shouldn’t be any need for NAT, DHCP, etc on the old laptop, if only it could just bridge the two connections.

It failed miserably.

Here are two articles that came the closest to being useful:
Howto bridge wireless and wired interfaces

In the end I’m running Ubuntu 9.10. I configured using the Ubuntu GUI my local wireless network and WPA(2?) password. It now connects by default.

Static config for the local subnet in /etc/network/interfaces:

auto eth0
iface eth0 inet static

Ubuntu dropped the ipmasq package that I usually use. Instead I uncommented the following line in /etc/sysctl.conf:


I also added these three lines to /etc/rc.local:

sudo iptables -A FORWARD -i wlan0 -o eth0 -s -m conntrack --ctstate NEW -j ACCEPT
sudo iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
sudo iptables -A POSTROUTING -t nat -j MASQUERADE

…and I installed dnsmasq, told it only to listen on eth0, and defined the range of IP addrs to use. It’s working beautifully.

Also, to keep the system from sleeping with the lid closed:
System : Preferences : Power Management. Changed “When laptop lid is closed” to “Blank screen” and the system keeps on trucking.

Note that the “Inhibit Applet” on the panel did nothing to stop the system from sleeping with the lid closed. I’m unimpressed with the Inhibit Applet.


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s