Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently moved out into a new bedsit which provides internet to each apartment through a 3rd party. The 3rd party has a webpage you must log into in order to connect to the internet (like in a hotel). The problem is that they only let you be logged in from one location at once, and I need to use my laptop and desktop at the same time.

What I need to do is connect my desktop to the internet through my laptop.

Wireless → Laptop → UTP → Desktop

So I tried bridging the connection. This worked, I had internet on both devices. However they were still seen as one device and thus only one could be logged in.

What I need to happen is for all requests to go through the laptop and then be passed on to the desktop, allowing me to use both at the same time. According to my (limited) knowledge, is this the function of a proxy server?

Are there any simple and lightweight (the laptop only has an Intel Atom) proxy servers you can recommend I use? The laptop dual-boots Windows 7 and Gentoo, so one that runs on either OS will do.

share|improve this question

migrated from Aug 12 '11 at 12:56

This question came from our site for system and network administrators.

This question is probably a better fit for Super User. Just hold tight and we'll get you migrated there... – jscott Aug 12 '11 at 12:50
A proxy's more trouble than it's worth: NAT's easier. Internet Connection Sharing on Windows is the easiest way to do so, but you can do the same in Gentoo using a series of iptables rules. – Michael Lowman Aug 12 '11 at 12:57

I think SSH Tunelling would solve this problem. Install ssh on your laptop and use this command to mount a tunnel from your Windows box to the laptop (you can use putty on Windows):

ssh user@laptop -D 8080

Make sure you protect your ssh server though, using keys only to authenticate and protecting it with a pasword is the best way to be safe. To copy you default local public key (on *NIX) on the server use this command:

ssh-copy-id user@laptop
share|improve this answer
just for clarity, that opens a SOCKS5 proxy. So you should configure your browser to connect to said proxy at localhost port 8080. – Michael Lowman Aug 12 '11 at 13:20
@Shadok I have a similar requirement. Do I have to do something on the server side too to make this work, because currently I am getting connection refused on my terminal when I try to access a page through my firefox – AnkurVj Aug 20 '11 at 14:58
@AnkurVj the only requirement is that ssh portforwading must be enabled IMO, are you sure you are actually connected to the ssh server ? You should see a listening tcp socket on your client, like that: tcp 0 0* LISTEN 1000 77434718 23750/ssh – Shadok Aug 22 '11 at 8:45
The machine that I am ssh-ing to is on the local network. Do I still need to do ssh port forwarding ? Where do i look for the listening tcp socket ? – AnkurVj Aug 22 '11 at 8:48
yes, you need portforwarding as it allows you to tunnel through the ssh server. To check your open ports use "netstat -an" under windows or "netstat -altupen |grep 8080" (if you used port 8080). – Shadok Aug 22 '11 at 10:56

For gentoo using iptables something like this should work:

echo 1 > /proc/sys/net/ipv4/ip_forward

/sbin/iptables -t nat -A POSTROUTING -o <wifi interface> -j MASQUERADE

done. :-)

share|improve this answer

You must log in to answer this question.