1. SETTING UBUNTU SERVER SEBAGAI PC ROUTER :
1. Aktifkan account root :
$ sudo passwd root
$ su root
2. Login melalui account root :
login as: root
root@192.168.10.1's password:
3. Setting protocol TCP/IP :
root@tkj1:~# vim /etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.255.5
netmask 255.255.255.224
network 192.168.255.0
broadcast 192.168.255.31
gateway 192.168.255.1 name server
auto eth1
iface eth1 inet static
address 192.168.10.1
netmask 255.255.255.0
network 192.168.10.0
broadcast 192.168.10.255
2. 4. Setting DNS RESOLVER :
root@tkj1:~# vim /etc/resolv.conf
search www.smk-hkbp.sch.id
nameserver 192.168.255.1
nameserver 180.131.145.145
10.17.125.288/3.244
ADD 10.0.2.15/255
Mask 255====0
5. Setting ip_forwarding :
root@tkj1:~# vim /etc/sysctl.conf
net.ipv4.ip_forward=1
6. Restart konfigurasi TCP/IP :
root@tkj1:~# /etc/init.d/networking restart
[ OK ]
7. Ping default gateway :
root@tkj1:~# ping 192.168.255.1
PING 192.168.255.1 (192.168.255.1) 56(84) bytes of data.
64 bytes from 192.168.255.1: icmp_req=1 ttl=64 time=0.217 ms
3. 8. Setting protocol TCP/IP computer client :
9. Test koneksi antara Server dan Client :
-dari server :
root@tkj1:/etc# ping 192.168.10.2
PING 192.168.10.2 (192.168.10.2) 56(84) bytes of data.
64 bytes from 192.168.10.2: icmp_req=1 ttl=128 time=0.133 ms
-dari client
C:Documents and SettingsStenly and Suwi>ping 192.168.10.1
Pinging 192.168.10.1 with 32 bytes of data:
Reply from 192.168.10.1: bytes=32 time<1ms TTL=64
Reply from 192.168.10.1: bytes=32 time<1ms TTL=64
Reply from 192.168.10.1: bytes=32 time<1ms TTL=64
Reply from 192.168.10.1: bytes=32 time<1ms TTL=64
IP Address : 192.168.10.2
Netmask : 255.255.255.0
Gateway : 192.168.10.1
4. Ping statistics for 192.168.10.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
C:Documents and SettingsStenly and Suwi>
10. Setting NAT agar client dapat terhubung internet :
root@tkj1:~# vim /etc/rc.local
iptables -t nat -A POSTROUTING -s 192.168.10.0/24 -d 0.0.0.0/0 -j MASQUERADE
root@tkj1:~# cd /etc
root@tkj1:/etc# ./rc.local
11. Reboot system :
root@tkj1:/etc# shutdown -r now
12. Test koneksi internet dari client :
C:Documents and SettingsStenly and Suwi>ping www.google.com
Pinging www.google.com [173.194.38.144] with 32 bytes of data:
Reply from 173.194.38.144: bytes=32 time=151ms TTL=49
Reply from 173.194.38.144: bytes=32 time=175ms TTL=49
Reply from 173.194.38.144: bytes=32 time=152ms TTL=49
Reply from 173.194.38.144: bytes=32 time=169ms TTL=49
Ping statistics for 173.194.38.144:
5. Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 151ms, Maximum = 175ms, Average = 161ms
C:Documents and SettingsStenly and Suwi>
6. Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 151ms, Maximum = 175ms, Average = 161ms
C:Documents and SettingsStenly and Suwi>