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 have some little problem while sharing wifi connection. I have 2 laptops. I need connection scheme like this:

laptop1 [wlan0] >>>>>>>> laptop2 [wlan0] (in ad-hoc mode, as ap, etc) >>>>> laptop2 [wlan1] >>>> internet.

laptop1 [wlan0] connecting to laptop2 [wlan0]. laptop2 connecting to internet through wlan1. Is it possible?

OS: Ubuntu on both machines

I tried this man (setting laptop2 wlan0 in ad-hoc mode):

laptop1 connects to laptop2, but can't access to internet.

share|improve this question
Are you trying to bridge the two wireless networks? Route between them? Act as a proxy? Or what? And how does laptop2 get Internet access? Does wlan1 have a Wifi router? (Most likely, you're trying to do something that won't work, such as bridge Wifi networks without WDS.) – David Schwartz Jun 27 '12 at 14:34
> Are you trying to bridge the two wireless networks? I think, yes. Commonly, I try to get internet access through laptop2. – andser Jun 27 '12 at 18:01
Laptop2 connects to the Wifi router as client and bridging to a wireless network you connect to as a client won't work. Nodes connected to the bridge won't be able to reach the access point the bridge connects to as a client because access points won't bridge to their clients. Thus the Wifi router can't reach nodes connected to the laptop. You can route from one Wifi network to the other or you can use a proxy server like Squid or ICS. – David Schwartz Jun 27 '12 at 18:09
Hmmm... Thanks. I'll try it. – andser Jun 28 '12 at 5:19
David Schwartz's - incorrect masquerading or SNAT/DNAT or bridge would work. Both laptops would be able to see everything before the AP, and access the internet. – Nanzikambe Sep 25 '13 at 23:01
up vote 0 down vote accepted

Try Squid proxy on the the Internet connected laptop.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .