[Ubuntu-ZW] Internet connection sharing on Ubuntu server

Humphrey hamub at shellmix.com
Fri May 4 22:36:05 UTC 2012

Hi Guys!

I have a computer running Ubuntu server 11.04, and i am trying to 
implement INTERNET connection sharing using 3G usb modem. Everything 
seems to work out fine except that when i try to connect to the INTERNET 
from my laptop using a crossover cable, some pages open but some refuse. 
For example i don't have a problem opening Ubuntu.com but i have 
problems opening m.facebook.com and some other pages. The machine with 
Ubuntu server is the one that connects to the INTERNET using ppp. I have 
run the following script for "ip sharing":


ip link set dev eth0 up
ip addr add dev eth0
sysctl net.ipv4.ip_forward=1
iptables -t nat -A POSTROUTING -o ppp0 -s -j MASQUERADE
iptables -t nat -A PREROUTING -i ppp0 -p tcp --dport 3074 -j DNAT 
iptables -t nat -A PREROUTING -i ppp0 -p udp -m multiport --dports 
88,3074 -j DNAT --to-destination
iptables -A FORWARD -i ppp0 -d -p tcp --dport 3074 -j ACCEPT
iptables -A FORWARD -i ppp0 -d -p udp -m multiport --dports 
88,3074 -j ACCEPT


Humphrey Butau

More information about the Ubuntu-zw mailing list