bikin router do debian 4.0

pertama setting interfacenya

# vi /etc/network/interfaces

auto eth0
iface eth0 inet static
address 192.168.0.254
netmask 255.255.255.0
broadcast 192.168.1.255

auto eth1
iface eth1 inet static
address 10.1.1.2
netmask 255.255.255.0
broadcast 10.1.1.255
gateway 10.1.1.1

setelah itu edit file resolv.com di directory /etc

#vi /etc/resolv.conf

nameserver 192.168.0.254 (IP DNS ini diperoleh dari ISP)

Edit file ipv4_forward untuk memForwardkan ip dari 2 eth.

#vi /etc/network/options

ip_forward = yes (ini yang terpenting )
spoofprotect = yes
syncookies = no

Masukkan rule iptables untuk share internet dari eth1 ke eth0.

#iptables -t nat -A POSTROUTING -s 10.1.1.0/24 -j MASQUERADE

untuk mempermanenkan rule iptables, jangan lupa menyimpannya.

#iptables-save

kemudian restart network

#/etc/init.d/networking restart

agar aman penyimpanan iptables
 lihat disini

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 )

Connecting to %s

Follow

Get every new post delivered to your Inbox.