featured video

Theme images by Storman. Powered by Blogger.

Total Pageviews

business

health

random posts

vehicles

Must Read

recent posts

navigation-menu

Sep 26, 2007

Sharing Internet di Linux

- No comments
Edit file rc.local supaya bisa sharing internet di linux
copy script berikut 'n simpan di /etc/rc.d/rc.local ato cari aza file rc.local di file system kmu.., yg pasti biasanya ada di /etc. Syaratnya login dulu sbg superuser or root !!!

example klo lwt konsol :

ur­name@ur-­cmptr :~$ sudo su
password :
root@ur­-cmptr : #

truz tinggal edit dahh script rc.local pake vi editor ato editor laen

root@ur­cmptr : # vi /etc/rc.d/rc.local

#untuk eth yang tersambung ke internet DEVICE=eth1

# Ini jalur INTERNAL ke INTERNET
iptables ­A FORWARD ­o $DEVICE ­i ! $DEVICE ­j ACCEPT

# In jalur balik dari INTERNET
iptables ­A FORWARD ­m state ­­state ESTABLISHED,RELATED ­j ACCEPT

iptables ­A FORWARD ­f ­j ACCEPT

# yang ini buat internet sharingnya
iptables ­t nat ­A POSTROUTING ­o $DEVICE ­j MASQUERADE

# dan ini pembuka gateway­nya.
echo "1" > /proc/sys/net/ipv4/ip_forward