1/13/13

Routing Iptables Linux

7:13 PM
Skenario Jaringan
PC1 terkoneksi internet (wlan0) dan PC2 (eth0)
PC2 terkoneksi dengan PC1 (eth0)
Konfigurasi Router
Setting PC1 :
its:~# ifconfig eth0 up
its:~# ifconfig eth0 192.168.1.1/24
its:~# echo 1 > /proc/sys/net/ipv4/ip_forward
its:~# echo "nameserver 8.8.8.8" > /etc/resolv.conf
its:~# iptables -t nat -A POSTROUTING -o wlan0 -s 192.168.1.0/24 -j MASQUERADE
Konfigurasi Client
Setting PC2 jika menggunkana linux:
its:~# ifconfig eth0 up
its:~# ifconfig eth0 192.168.1.3/24
its:~# route add default gw 192.168.1.1
its:~# echo "nameserver 8.8.8.8" > /etc/resolv.conf
Setting PC2 jika menggunkanan windows:
1. open network and sharing center
2. change adapter settings
3. local area connections, properties
4. TCP/IPv4
5. use the following ip address
   ip address     : 192.168.1.3
   subnet mask    : 255.255.255.0
   default gateway: 192.168.1.1
6. use the following dns server addresses
   prefered dns server: 8.8.8.8
ket: untuk melakukkan routing minimal memiliki 2 interface card

Never Give Up

ALLAH SWT Doesn't Leave Us, So Don't Give Up With Your Problems ^_^
Thanks To ALLAH SWT