deng@deng:~$ sudo nano /etc/network/interfaces
Selanjutnya, lakukan konfigurasi seperti dibawah ini
# interfaces(5) file used by ifup(8) and ifdown(8) auto lo iface lo inet loopback iface tap0 inet tap0 address 192.168.1.1 netmask 255.255.255.0
Lakukan Konfigurasi iptables
jika sudah tekan Ctrl+x dan kemudian ketik y untuk menyimpan konfigurasi.deng@deng:~$ sudo nano /etc/rc.local [sudo] password for deng: masukkanpasswordnyadisini #!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE iptables -A FORWARD -i tap0 -j ACCEPT exit 0
Langkah
selanjtunya buat topologi seperti pada gambar beriktu dan Set cloud --> configure -->
tap-->add tap0
Pada Router, lakukan configurasi ip address dan default route
[admin@MikroTik] > system identity set name=IDN_R1 [admin@IDN_R1] > ip address add address=192.168.1.2/24 interface=ether2 [admin@IDN_R1] > ip address print Flags: X - disabled, I - invalid, D - dynamic # ADDRESS NETWORK INTERFACE 0 192.168.1.2/24 192.168.1.0 ether2 [admin@IDN_R1] > ping 192.168.1.1 HOST SIZE TTL TIME STATUS 192.168.1.1 56 64 10ms 192.168.1.1 56 64 3ms 192.168.1.1 56 64 1ms 192.168.1.1 56 64 1ms sent=4 received=4 packet-loss=0% min-rtt=1ms avg-rtt=3ms max-rtt=10ms [admin@IDN_R1] > ip route add dst-address=0.0.0.0/0 gateway=192.168.1.1 [admin@IDN_R1] > ping 8.8.8.8 HOST SIZE TTL TIME STATUS 8.8.8.8 56 55 62ms 8.8.8.8 56 55 41ms 8.8.8.8 56 55 28ms 8.8.8.8 56 55 31ms sent=4 received=4 packet-loss=0% min-rtt=28ms avg-rtt=40ms max-rtt=62ms [admin@IDN_R1] > ping google.com invalid value for argument address: invalid value of mac-address, mac address required invalid value for argument ipv6-address while resolving ip-address: could not get answer from dns server [admin@IDN_R1] > ping www.google.com invalid value for argument address: invalid value of mac-address, mac address required invalid value for argument ipv6-address while resolving ip-address: could not get answer from dns server
Lah kok nggak bisa, oooh Set DNS Server nya dulu yaa
[admin@IDN_R1] > ip dns set servers=8.8.8.8 allow-remote-requests=yes [admin@IDN_R1] > ping www.google.com HOST SIZE TTL TIME STATUS 43.240.231.17 56 56 15ms 43.240.231.17 56 56 20ms 43.240.231.17 56 56 21ms sent=3 received=3 packet-loss=0% min-rtt=15ms avg-rtt=18ms max-rtt=21ms [admin@IDN_R1] > ping facebook.com HOST SIZE TTL TIME STATUS 173.252.90.36 56 75 257ms 173.252.90.36 56 75 256ms 173.252.90.36 56 75 258ms sent=3 received=3 packet-loss=0% min-rtt=256ms avg-rtt=257ms max-rtt=258ms
Untuk langkah selanjutnya, yaitu menghubung pc yang berada dibawa router tersebut ke internet, insya Allah kita lanjutkan besok.
Tunggu tak benerin laptop dulu, ini ngepostnya juga make laptopnya temen. Semoga Anda sabar menanti..
No comments:
Post a Comment
Tak ada gading yang tak retak!!
Komentar dan masukan yang bersifat membangun selalu kami harapkan, demi kebaikan bersama.