File-file yang akan dikonfigurasi pada pembuatan routing Debian 8 adalah :
- interfaces
- sysctl.conf
- rc.local
Langkah-langkah konfigurasi sebagai berikut:
Login menggunakan root
~# nano /etc/network/interfaces
auto lo eth0 eth1
iface lo inet loopback
iface eth0 inet static
address 192.168.1.2
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
iface eth1 inet static
address 172.15.10.1
netmask 255.255.255.248
network 172.15.10.0
broadcast 172.15.10.7
setelah itu disimpan (CTRL+O <enter>, CTRL+X)
~# nano /etc/sysctl.conf
cari teks berikut
# net.ipv4.ip_forward=1
Lalu lepas tanda pagar (#) untuk diaktifkan:
net.ipv4.ip_forward=1
setelah itu disimpan (CTRL+O <enter>, CTRL+X)
~# nano /etc/rc.local
Masukkan perintah berikut di atas teks “Exit 0”
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables –t nat –A POSTROUTING –o eth0 –j MASQUERADE
exit 0
setelah itu disimpan (CTRL+O <enter>, CTRL+X)
~# service networking restart
- interfaces
- sysctl.conf
- rc.local
Langkah-langkah konfigurasi sebagai berikut:
Login menggunakan root
~# nano /etc/network/interfaces
auto lo eth0 eth1
iface lo inet loopback
iface eth0 inet static
address 192.168.1.2
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
iface eth1 inet static
address 172.15.10.1
netmask 255.255.255.248
network 172.15.10.0
broadcast 172.15.10.7
setelah itu disimpan (CTRL+O <enter>, CTRL+X)
~# nano /etc/sysctl.conf
cari teks berikut
# net.ipv4.ip_forward=1
Lalu lepas tanda pagar (#) untuk diaktifkan:
net.ipv4.ip_forward=1
setelah itu disimpan (CTRL+O <enter>, CTRL+X)
~# nano /etc/rc.local
Masukkan perintah berikut di atas teks “Exit 0”
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables –t nat –A POSTROUTING –o eth0 –j MASQUERADE
exit 0
setelah itu disimpan (CTRL+O <enter>, CTRL+X)
~# service networking restart
No comments:
Post a Comment