Langkah Kerja :
· Yang paling utama sediakan Pc dalam keadaan baik , Os linuk (debian 5) dan LAN Card tambahan untuk client,
· Lakukan konfigurasi pada Terminal
· Ketik perintah berikut :
Pico /etc/network/interfaces
· Kemudian tambakan tulisan di bawah ini :
# the secondary network interface
Auto eth1
Iface eth1 inet static
Address 172.16.1.1
Netmask 255.255.255.192
Network 172.16.1.0
Broadcast 172.16.1.63
· Sehingga menjadi seperti ini :
# the primary network interface
Allow-hotplug eth0
Iface eth0 inet static
Address 192.168.30.10
Netmask 255.255.255.0
Network 192.168.30.0
Broadcast 192.168.30.63
Gateway 192.168.10.62
# dns-* option are implemented by the resolvconf package,if installed
Dns-nameservers 192.168.1.1
Dns-search autosmk2bna.sch.id
# the secondary network interface
Auto eth1
Iface eth1 inet static
Address 172.16.1.1
Netmask 255.255.255.192
Network 172.16.1.0
Broadcast 172.16.1.63
· kemudian restart networknya
/etc/init.d/networking restart
(reconfiguration network interfaces. . . . . . . . . .done
· restart komputernya
reboot
· ketik perintah di bawah ini :
ifconfig | less
eth0 eLink encap:Ethernet HWaddr 00:0c:29:32:97:44
inet addr:192.168.1.1 Bcast:192.168.1.63 Mask:255.255.255.192
inet6 addr: fe80::20c:29ff:fe32:9744/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5 errors:0 dropped:0 overruns:0 frame:0
TX packets:82 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:400 (400.0 B) TX bytes:3660 (3.5 KiB)
Interrupt:19 Base address:0x2000
eth1 Link encap:Ethernet HWaddr 00:0c:29:32:97:4e
inet addr:172.16.1.62 Bcast:172.16.1.63 Mask:255.255.255.192
inet6 addr: fe80::20c:29ff:fe32:974e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:148 errors:0 dropped:0 overruns:0 frame:0
TX packets:100 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:12617 (12.3 KiB) TX bytes:9610 (9.3 KiB)
Interrupt:16 Base address:0x2080
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
inet addr:192.168.1.1 Bcast:192.168.1.63 Mask:255.255.255.192
inet6 addr: fe80::20c:29ff:fe32:9744/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5 errors:0 dropped:0 overruns:0 frame:0
TX packets:82 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:400 (400.0 B) TX bytes:3660 (3.5 KiB)
Interrupt:19 Base address:0x2000
eth1 Link encap:Ethernet HWaddr 00:0c:29:32:97:4e
inet addr:172.16.1.62 Bcast:172.16.1.63 Mask:255.255.255.192
inet6 addr: fe80::20c:29ff:fe32:974e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:148 errors:0 dropped:0 overruns:0 frame:0
TX packets:100 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:12617 (12.3 KiB) TX bytes:9610 (9.3 KiB)
Interrupt:16 Base address:0x2080
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
· lalu pastikan setinggan IP address di windows :
IP address: 172.16.1.2
Subnet mask 255.255.255.192
Default geteway 172.16.1.1
Preferred DNS server 172.16.1.1
· lalu kita cek koneksi dari server itu sendiri :
ping 192.168.1.62
tersambung ?
· lau kita cek koneksi dari client itu sendiri :
ping 172.16.1.62
tersambung ?
· ketik perintah ini :
pico /etc/sysctl.conf
· hilangkan tanda # pada baris :
# uncomment the next line to enable packet forwarding for IPv4
# net .IPv4.ip_forward=1
· seperti ini :
· # uncomment the next line to enable packet forwarding for IPv4
net .IPv4.ip_forward=1
· Lalu ketik perintah ini :
Iptables –t nat –n –L
Bila tampil seperti ini berarti sudah berhasil :
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- 0.0.0.0/0 0.0.0.0/0
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- 0.0.0.0/0 0.0.0.0/0
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
· Catatan :
Cara setingan IP address pada server & client
Server :
ETH0
IP 192.168.30.10
MS 255.255.255.0
AG 192.168.30
ETH1
IP 172.16.1.1
MS 255.255.255.192
AG 192.16.1.2
Client
Client 1
IP 192.168.10.9
SM 255.255.255.0
DF 192.168.30.10
Client 2
IP 172.16.1.2
SM 255.255.255.0
DF 192.168.30.1