Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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): https://help.ubuntu.com/community/WifiDocs/Adhoc#Network_Manager

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
add comment

1 Answer

up vote 0 down vote accepted

Try Squid proxy on the the Internet connected laptop.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.