I
I
inode2010-10-03 21:19:10
WiFi
inode, 2010-10-03 21:19:10

Internet connection issue after creating wireless network in Ubuntu 9.10?

Hello,
I want to set up a wireless network at home in order to access the internet from my smartphone. Operating system - Ubuntu 9.10 Desktop Edition, wi-fi adapter TP-LINK TL-WN821N. I am trying to create a wireless network using an applet. The network is being created and I can see it from my smartphone. Unfortunately, this loses access to the Internet on the host. At the same time, as far as I understand, there is a physical Internet connection, but for some reason the sites in the browser do not open and do not respond. It seems that Ubuntu, after connecting the wi-fi adapter, is trying to connect to the Internet through it, but this is just my guess.
I'm new to Ubuntu, any advice would be greatly appreciated.
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
Goshil, 2010-10-04
@Goshil

It seems to me that this is not a matter of DNS at all.
1) So, in a computer connected to the network there is such a table - routing. It states, in particular, through which network cards and ip-addresses of this computer where you can get (internal network, Internet).
If you have, for example, one network card (let it be wired, with an interface called eth0), then the table has one main route - to all addresses (on the Internet, the grid) ask through this interface.
As soon as you install a second network card (for example, wireless, wlan0) and create a connection through it, the second main route appears in the table - ask for all sites and requested addresses through the second network card.
As a result, there are two equivalent routes in the table and the system does not know from which interface it is really necessary to take information. So your initial guess is correct.
2) How to fix the Internet:
All commands are made in the console / terminal, through "sudo". We will call the wired and wireless interface eth0 and wlan0, respectively. After "//" there will be a comment, it is not necessary to write it.
route del default //delete the default route route del default //not a typo ,
this command will delete the second default route if it was created We restored the Internet, now we will arrange its distribution to the smartphone:
echo 1 >/proc/sys/net/ipv4/ip_forward //allow the Linux kernel to forward network packets between network cards
iptables -F //just in case, clear the firewall rules table, the main one for "sharing"
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE //write a rule in the firewall table that a person who comes from any interface (including the only one except eth0, wlan0) and asks for an Internet will receive this Internet from eth0
That's it, just a few commands in the terminal. By the way, you can drive them into a script and put them in autoload, so that every time after a reboot you don’t enter the same thing.
If something does not work out, write here, and (preferably) study the literature on the use of programs / commands route, iptables, bash (on shell scripts, in particular)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question