As I told in some previous post I’m using 3G modem on Linux to access the Internet in my computer, but today I decided to share my internet connection with my sister, yes her computer runs Linux too.
When the 3G connection is successful Linux creates a “ppp0” interface. Then I connected ethernet cross-cable between my computer and her computer. These are the steps to share connection:
On my computer (where the 3G modem is connected):
# ifconfig eth0 192.168.0.1 up # iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE # echo 1 > /proc/sys/net/ipv4/ip_forward
On her computer I just run:
# ifconfig eth0 192.168.0.2 # route add default gw 192.168.0.1
And I added in the /etc/resolv.conf:
nameserver 200.169.117.22 nameserver 200.169.119.22
Done!
Update: In some new Ubuntu versions you need to disable the ufw: $ sudo ufw disable. Other important tip on Ubuntu network config (nm-applet of NetworkManager) there is an option to share internet too.
Usa o DNS da Google:
nameserver 8.8.8.8
nameserver 8.8.4.4
Mais fácil de lembrar! `;^)
Grande Narcélio!
Como estão as coisas aí na uLevel?
Obrigado pela dica, muito boa.
Um abraço,
Alan