OT Using Internet Sharing on a Wireless PC

Garry Knight garryknight at gmx.net
Thu Dec 7 18:20:05 UTC 2006

Wade Smart wrote:

> Sorry about that. I'll describe this out.
> My computer is hooked directly to the cable modem and the laptop is
> wireless to the same cable modem.

So the cable modem has a single Ethernet port and WiFi?

> If I hook the PS2 directly to the modem in place of my computer and then
> use the laptop as the internet connection for the PS3, that is what I
> was wanting to do.

Can't help with the PS2 or PS3 as I don't know anything about them. So I
don't know what "use the laptop as the internet connection for the PS3"
means, but hopefully some other PS3 user will.

> I ran into the problem of shared internet connection relies on having
> as the address and the laptop has .0.4. I dont know if what
> I wanted to do was possible but I thought it might be.

This still isn't clear. You haven't said what it is that has the IP Am I right in guessing that the PC has a static IP of on the Ethernet port that connects to the modem?

Does it also have another Ethernet port onto which you're going to hang the
PS3? If so, then all you have to do is temporarily change the laptop's IP
to, then change it back when you're done.

If the laptop is running Linux, then you simply add the following rules to
your firewall:

modprobe iptable_nat
modprobe ip_nat_ftp
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
echo 1 >/proc/sys/net/ipv4/ip_forward

In fact, if you just put #!/bin/bash as the first line, save it as a script
and make it executable, you get a 4-line firewall that suits most people's
purposes. It 'stealths' the machine and allows Internet sharing. (Note that
the 'eth0' assumes that whatever plugs into the modem does so via ethernet
port eth0.)

Garry Knight
garryknight at gmx.net

More information about the ubuntu-users mailing list