Promo

 

1. Setting ip address dengan mengedit file /etc/network/interfaces
debian:~# nano /etc/network/interfaces
#lalu pastikan script ip anda seperti di bawah ini
auto lo
iface lo inet loopback

allow-hotplug eth0
auto eth0
iface eth0 inet static
address 219.83.63.151
netmask 255.255.255.240
network 192.168.24.0
broadcast 219.83.63.159
gateway 219.83.63.145
dns-nameservers 202.155.0.10

allow-hotplug eth1
auto eth1
iface eth1 inet static
address 192.168.11.62
netmask 255.255.255.192
network 192.168.11.0
broadcast 192.168.11.63
gateway 192.168.33.1

#Kemudian restart jaringan
debian:~#/etc/init.d/networking restart
2. Untuk mengecek apakah konfigurasi sudah benar dengan perintah
debian:~# ifconfig

eth0 Link encap:Ethernet HWaddr 00:10:83:01:e6:77
inet addr:219.83.63.151 Bcast:219.83.63.159 Mask:255.255.255.240
inet6 addr: fe80::210:83ff:fe01:e677/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:180389 errors:18 dropped:0 overruns:0 frame:18
TX packets:6881 errors:7 dropped:0 overruns:0 carrier:7
collisions:70 txqueuelen:1000
RX bytes:16215501 (15.4 MiB) TX bytes:1504204 (1.4 MiB)
Interrupt:20 Base address:0xdf00

eth1 Link encap:Ethernet HWaddr 00:24:01:ed:0e:02
inet addr:192.168.11.62 Bcast:192.168.11.63 Mask:255.255.255.192
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:19 Base address:0xdc00

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:76 errors:0 dropped:0 overruns:0 frame:0
TX packets:76 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:7620 (7.4 KiB) TX bytes:7620 (7.4 KiB)
3. Aktifkan ip forward-nya edit file nano /etc/sysctl.conf dengan mengisikan baris berikut :
debian:~# nano /etc/sysctl.conf
net.ipv4.ip_forward = 1
net.ipv4.conf.default.forwarding = 1
net.ipv4.conf.all.accept_source_route = 1
4. Tambahkan script baris perintah ini pada /etc.rc.local
debian:~# nano /etc/rc.local
echo “1”>/proc/sys/net/ipv4/ip_forward
iptable –t nat –A POSTROUTING –o eth0 –j MASQUERADE
5. debian:~# chmod +x chmod +x /etc/rc.local
6. Restart jaringan dengan perintah /etc/init.d/networking restart
lalu periksa jaringan dari klien ke router, terus ke dns baru ke internet
 
Top