KONFIGURASI ROUTER DI UBUNTU SERVER


hai kawan gw cuma mao sharing ilmu doang nih gw punya tutor buat bikin ruter nih .bisa di coba ko…

mohon maaf ya, klo yang udah bisa gw tag coz gw gak tau 

 

1. konfigurasi eth0 dan eth1

2. konfigurasi router pertama dengan mengetik nano /etc/sysctl.conf

(cari tulisan #net.ipv4.ip_forward=1 dan hapus tanda pagar, jika sudah selesai save konfigurasi tersebut)

3.ketik lah  iptables -A FORWARD -i eth0 -o eth1 -s IP_yg_ingin_di_route/netmask -m conntrack –ctstate NEW -j ACCEPT

 contoh (iptables -A FORWARD -i eth0 -o eth1 -s 196.150.22.0/24  -m conntrack –ctstate NEW -j ACCEPT)

4. iptables -A FORWARD -m conntrack –ctstate ESTABLISHED,RELATED -j ACCEPT 

5. iptables -A POSTROUTING -t nat -j MASQUERADE 

6.echo “1”>/proc/sys/net/ipv4/ip_forward

7. iptables-save

8. nano /etc/rc.local

di rc.local ketik lah

iptables -A FORWARD -i eth0 -o eth1 -s 196.150.22.0/24 -m conntrack –ctstate NEW -j ACCEPT

iptables -A FORWARD -m conntrack –ctstate ESTABLISHED,RELATED -j ACCEPT 

iptables -A POSTROUTING -t nat -j MASQUERADE 

echo “1”>/proc/sys/net/ipv4/ip_forward di atas exit 0

pembuatan router selesai ….

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: