KUMDAT TIK2

KUMDAT TIK2

Script Mikrotik

MEMBUAT IP ADDRESS
-----------------------
[admin@MikroTik] >ip address add address=165.9.9.243/16 interface=public
[admin@MikroTik] >ip address add address=192.168.1.254/24 interface=local

MEMBUAT gateway
-----------------
[admin@MikroTik] >ip route add gateway=165.9.9.254

MEMBUAT DNS
------------------
[admin@MikroTik] >ip dns set primary-dns=202.152.165.36 secondary-dns=202.99.40.173
 allow-remote-requests=yes

MASQUARADE
----------
[admin@MikroTik] >ip firewall nat add chain=srcnat src-address=192.168.1.0/24 out-interface=ether1
 action=masquerade

MIKROTIK SEBAGAI PROXY
----------------------
A. mengaktifkan web proxy
[admin@MikroTik] >ip proxy set enabled=yes

B. konfigurasi IP web proxy
[admin@MikroTik] > ip web-proxy set enabled=yes src-address=0.0.0.0 port=8080 ho
stname="proxy.ac.id" transparent-proxy=yes parent-proxy=0.0.0.0 cache-administra
tor="fadli" max-object-size=4096KiB cache-drive=system max-cache-size=unlimited
max-ram-cache-size=unlimited

C. konfigurasi proxy transparent

[admin@MikroTik] > ip firewall nat add chain=dstnat src-address-list=192.168.1.0/24
 dst-port=80 in-interface=ether2 protocol=tcp action=redirect to-ports=8080
[admin@MikroTik] > ip firewall nat add chain=dstnat src-address-list=192.168.1.0/24
 dst-port=3128 in-interface=ether2 protocol=tcp action=redirect to-ports=8080

[admin@MikroTik] > ip firewall nat add chain=dstnat src-address-list=192.168.1.0/24
 dst-port=8080 in-interface=ether2 protocol=tcp action=redirect to-ports=8080

[admin@MikroTik] > ip firewall nat add chain=dstnat protocol=tcp dst-port=80 action=accept
[admin@MikroTik] > ip firewall nat add chain=dstnat protocol=tcp dst-port=3128 action=accept
[admin@MikroTik] > ip firewall nat add chain=dstnat protocol=tcp dst-port=8080 action=accept  

MEMBUAT DHCP SERVER
-----------------------
[admin@MikroTik] > ip pool add name=dhcp-puskom ranges=192.168.1.2-192.168.1.253

[admin@MikroTik] > ip dhcp-server network add address=192.168.1.0/24 gateway=192.168.1.254

[admin@MikroTik] > ip dhcp-server add interface=ether2 address-pool=dhcp-puskom    
[admin@MikroTik] > ip dhcp-server

[admin@MikroTik] ip dhcp-server> print
Flags: X - disabled, I - invalid
 #   NAME                                       INTERFACE RELAY           ADDRESS-POOL LEASE-TIME ADD-ARP
 0 X dhcp1                                      ether2                    dhcp-puskom  3d      
[admin@MikroTik] ip dhcp-server> enable
numbers: 0

MEMBUAT HOTSPOT
-----------------
[admin@MikroTik] > ip hotspot setup



By. Admin Muda 12_47

0 komentar:

Posting Komentar