How to share a 3G connection through Ubuntu to Windows?

2

I have a laptop with Ubuntu 10.10 installed and internet connection through a 3G modem.

I set up a wireless network on Ubuntu, set up its IP to 192.168.0.1, netmask 255.255.255.0 and gateway 192.168.0.1, and then connected to this WiFi.

On Windows 7, I set up IPv4 settings, entered the IP address for computer 192.168.0.2, netmask 255.255.255.0, gateway 192.168.0.1, the same as Ubuntu. Then Windows 7 recognized the network, but there was no internet access.

How is this possible?

ifconfig results:

eth0      Link encap:Ethernet  HWaddr 00:26:22:c3:8a:6e  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:46 Base address:0xa000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:3918 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3918 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:592030 (592.0 KB)  TX bytes:592030 (592.0 KB)

ppp0      Link encap:Point-to-Point Protocol  
          inet addr:10.139.93.32  P-t-P:10.64.64.64  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:175 errors:0 dropped:0 overruns:0 frame:0
          TX packets:198 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:49502 (49.5 KB)  TX bytes:25607 (25.6 KB)

wlan0     Link encap:Ethernet  HWaddr 90:4c:e5:8f:19:cf  
          inet6 addr: fe80::924c:e5ff:fe8f:19cf/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:507 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4083 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:45203 (45.2 KB)  TX bytes:316853 (316.8 KB

user873286

Posted 2011-10-08T20:21:15.610

Reputation: 121

This is off-topic for stackoverflow. See the faq.

– Ken Wayne VanderLinde – 2011-10-08T20:24:40.317

What specifically did you set up? How does it look like in network manager, or even better: Show us the output of ifconfig. Gateway 1.1.1.1 does not make any sense at all – where did you get this info? – slhck – 2011-10-08T21:38:44.590

now when i find it from windows 7 it connects but says that IPv4 Connectivity: No Network access – user873286 – 2011-10-08T22:32:50.153

Answers

0

On Ubuntu, since 10.10, try using Network Manager. It had a nice "share connection" dialog, where you could start a wifi hotspot IIRC. Also, you will need Firestarter, since that does the connection sharing. At least, this is how I shared my 3G connection. (But seriously, the other way around would be much more convenient with Connectify/VirtualRouter on Windows, and the Ubuntu guest.)

Apache

Posted 2011-10-08T20:21:15.610

Reputation: 14 755

0

Question: How is it possible that the ubuntu machine does not automagically acts as a router. Answer: You have to tell it to.

Use Shikis's answer and use the Network Manager: help.ubuntu.com

You should not use a WiFi access point, as it will try to be the default route unless you can configure it not to.

So make sure you are using ad-hoc networking.

user27163

Posted 2011-10-08T20:21:15.610

Reputation: