since i can’t afford to use 3G connection at UTM so i’m online through public hotspot at my hostel. even it’s not so realiable due to many downtime but it’s better then no connection at all right?
my roomate using desktop pc so he have to buy wireless adapter if he want to use the wifi too.
the cheapest wireless adapter will cost around rm 60-70.
since i alway turn my laptop on (it’s hot but i don’t care) so i told him to find a lan cable for pc to pc connection.
then do a little trick with my ubuntu which is ip masquerading
$sudo iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
eth1 is my wifi card interface, my roomate pc connected to lan network card on eth0
my laptop eth0 setting
ip address : 192.168.1.1
netmask : 255.255.255.0
configured my roomate pc with setting
ip address : 192.168.1.2
netmask : 255.255.255.0
gateway : 192.168.1.1
dns : 161.139.250.2 (utm’s dns)
you must put the dns so that you can surf website.
that’s it. cheap and easy way to get connected. one meter lan cable will only cost you 90 cent
added : make sure you enabled ip forwarding
$echo 1 > /proc/sys/net/ipv4/ip_forward
or put net.ipv4.ip_forward=1 in your /etc/sysctl.conf if you want it to be permanent
p/s: iptables rule set will disappear after reboot
recommended reference : Internet Connection Sharing Server 2 nic cards
8 Comments
Owh owh owh… Kalu XP, just dharing connection jer kan…..
laju tak internet ? berapa downstream/ upstream ?
wei ko tahu apa masalah besar ngan linux. semua yg di intergrate dalam windows melalui GUI kena guna terminal kat linux.
org dari era 80an tau la guna terminal. lahir tahun 91 mampus lu nak guna skrin hitam putih.
aku tau mkdir jer dalam terminal tu.
Adakah bermaksud kawan kau itu boleh masuk PC kau? Hu3. Saje je nak tanya kan…
@azhar a’ah..tick je share connection kekeke
@adi ibarat guna streamyx pakej 1mb kat cc tapi biasala bila wifi ni putus2 je selalu
@azraai ada yang lahir tahun 1995 yg geti cmdline,selalu guna nanti mahir la..lolz
@fauzi bleh..kat shared folder je
linux, windows, dgn apple punya command line beza. windows punya command prompt aku dah hafal command dia. tapi linux jer tak hafal sbb mmg lahir dah lama.
Command tuk epel ape? hahaha
(saya baru belajar)
ubuntu user :![[color] [color]](http://wan.pengganas.net/smilies/color.gif)
http://ubuntuforums.org/showthread.php?t=335465