Konfigurasi Router Sebagai Gateway

Konfigurasi Router Sebagai Gateway

interface set ether1 name=router
interface set ether2 name=kantor
interface set ether3 name=perpus
interface set ether4 name=lapkom

ip address add address=192.168.2.2 netmask=255.255.255.0 interface=router
ip address add address=192.168.20.1 netmask=255.255.255.0 interface=kantor
ip address add address=192.168.40.1 netmask=255.255.255.0 interface=lapkom
ip address add address=192.168.50.1 netmask=255.255.255.0 interface=perpus

ip route add gateway= 192.168.2.1

ip dns set primary-dns=203.130.208.18
ip dns set secondary-dns=203.130.206.250

ip firewall address-list add address=192.168.20.2 list=kantor disabled=no comment=List Kantor
ip firewall address-list add address=192.168.20.3 list=kantor disabled=no
ip firewall address-list add address=192.168.20.4 list=kantor disabled=no
ip firewall address-list add address=192.168.20.5 list=kantor disabled=no
ip firewall address-list add address=192.168.20.6 list=kantor disabled=no
ip firewall address-list add address=192.168.20.7 list=kantor disabled=no
ip firewall address-list add address=192.168.20.8 list=kantor disabled=no
ip firewall address-list add address=192.168.20.9 list=kantor disabled=no
ip firewall address-list add address=192.168.20.10 list=kantor disabled=no
ip firewall address-list add address=192.168.20.11 list=kantor disabled=no
ip firewall address-list add address=192.168.20.12 list=kantor disabled=no
ip firewall address-list add address=192.168.20.13 list=kantor disabled=no
ip firewall address-list add address=192.168.20.14 list=kantor disabled=no
ip firewall address-list add address=192.168.20.15 list=kantor disabled=no

ip firewall address-list add address=192.168.40.0/24 list=lapkom disabled=no comment=List Lapkom

ip firewall address-list add address=192.168.50.2 list=perpus disabled=no
ip firewall address-list add address=192.168.50.3 list=perpus disabled=no
ip firewall address-list add address=192.168.50.4 list=perpus disabled=no
ip firewall address-list add address=192.168.50.5 list=perpus disabled=no
ip firewall address-list add address=192.168.50.6 list=perpus disabled=no

ip firewall nat add chain=srcnat out-interface=router src-address-list=admin action=src-nat to-addresses=192.168.2.2
ip firewall nat add chain=srcnat out-interface=router src-address-list=kantor action=src-nat to-addresses=192.168.2.2
ip firewall nat add chain=srcnat out-interface=router src-address-list=perpus action=src-nat to-addresses=192.168.2.2
ip firewall nat add chain=srcnat out-interface=router src-address-list=lapkom action=src-nat to-addresses=192.168.2.2

queue simple add name=user1 target-addresses=192.168.20.2 max-limit=20000/30000 time=00:07:00-13:45:00,sun,mon,tue,wed,thu,fri,sat
queue simple add name=user2 target-addresses=192.168.20.3 max-limit=20000/30000 time=00:07:00-13:45:00,sun,mon,tue,wed,thu,fri,sat
queue simple add name=lapkom target-addresses=192.168.40.0/24 max-limit=256000/512000 time=00:07:00-13:45:00,sun,mon,tue,wed,thu,fri,sat

dari winbox masuk ke ip=>arp
klik kanan pilih make static ( Huruf D akan hilang )
jika ingin merubah ke dynamic tinggal di hapus ja..
beres..

Iklan