Sie sind auf Seite 1von 7

Set Ip Address Tiap interface

Code:

/ip address add address=10.10.10.1/24 interface=ether1


/ip address add address=10.10.11.2/24 interface=ether2

Setting DNS Resolver Mikrotik dan PC


Code:
/ip dns static add name=sobatkucyber.com address=10.10.10.1
/ip dns set primary-dns=10.10.11.2 secondary-dns=202.134.1.1 allow-remote-
requests=yes

Masqurade Jaringan LAN


Code:
/ip firewall nat add chain=srcnat src-address=10.10.10.0/24 action=masquerade

Memberikan Nama Router


Code:
/system identity set name=E-Net

Set jam Otomatis


Code:
system ntp client set primary-ntp=0.pool.ntp.org secondary-
ntp=3.pool.ntp.org enabled=yes

Menentukan Default Routing


Code:
/ip route gateway=192.168.2.1

Membuat Mark Connection yang nantinya di pakai untuk memilah Paket


Code:
/ip firewall mangle add chain=forward src-address=10.10.10.100 action=mark-
connection new-connection-mark=billing
/ip firewall mangle add chain=forward src-address=10.10.10.101 action=mark-
connection new-connection-mark=pc1
/ip firewall mangle add chain=forward src-address=10.10.10.102 action=mark-
connection new-connection-mark=pc2
/ip firewall mangle add chain=forward src-address=10.10.10.103 action=mark-
connection new-connection-mark=pc3
/ip firewall mangle add chain=forward src-address=10.10.10.104 action=mark-
connection new-connection-mark=pc4
/ip firewall mangle add chain=forward src-address=10.10.10.105 action=mark-
connection new-connection-mark=pc5
/ip firewall mangle add chain=forward src-address=10.10.10.106 action=mark-
connection new-connection-mark=pc6
/ip firewall mangle add chain=forward src-address=10.10.10.107 action=mark-
connection new-connection-mark=pc7
/ip firewall mangle add chain=forward src-address=10.10.10.108 action=mark-
connection new-connection-mark=pc8
/ip firewall mangle add chain=forward src-address=10.10.10.109 action=mark-
connection new-connection-mark=pc9
/ip firewall mangle add chain=forward src-address=10.10.10.110 action=mark-
connection new-connection-mark=pc10

Membuat mark packet untuk Queue, yang didapat dari mark connection
Code:
/ip firewall mangle add chain=forward connection-mark=billing action=mark-
packet new-packet-mark=billing
/ip firewall mangle add chain=forward connection-mark=pc1 action=mark-packet
new-packet-mark=pc1
/ip firewall mangle add chain=forward connection-mark=pc2 action=mark-packet
new-packet-mark=pc2
/ip firewall mangle add chain=forward connection-mark=pc3 action=mark-packet
new-packet-mark=pc3
/ip firewall mangle add chain=forward connection-mark=pc4 action=mark-packet
new-packet-mark=pc4
/ip firewall mangle add chain=forward connection-mark=pc5 action=mark-packet
new-packet-mark=pc5
/ip firewall mangle add chain=forward connection-mark=pc6 action=mark-packet
new-packet-mark=pc6
/ip firewall mangle add chain=forward connection-mark=pc7 action=mark-packet
new-packet-mark=pc7
/ip firewall mangle add chain=forward connection-mark=pc8 action=mark-packet
new-packet-mark=pc8
/ip firewall mangle add chain=forward connection-mark=pc9 action=mark-packet
new-packet-mark=pc9
/ip firewall mangle add chain=forward connection-mark=pc10 action=mark-packet
new-packet-mark=pc10

Membuat Parent tertinggi Queue


Code:
/queue tree add name=E-Net parent=ether2 max-limit=10000000

Membuat Queue per terminal


Code:
/queue tree add name=pcbil packet-mark=billing parent=E-Net limit-at=64000
max-limit=250000
/queue tree add name=pc1 packet-mark=pc1 parent=E-Net limit-at=64000 max-
limit=250000
/queue tree add name=pc2 packet-mark=pc2 parent=E-Net limit-at=64000 max-
limit=250000
/queue tree add name=pc3 packet-mark=pc3 parent=E-Net limit-at=64000 max-
limit=250000
/queue tree add name=pc4 packet-mark=pc4 parent=E-Net limit-at=64000 max-
limit=250000
/queue tree add name=pc5 packet-mark=pc5 parent=E-Net limit-at=64000 max-
limit=250000
/queue tree add name=pc6 packet-mark=pc6 parent=E-Net limit-at=64000 max-
limit=250000
/queue tree add name=pc7 packet-mark=pc7 parent=E-Net limit-at=64000 max-
limit=250000

Firewall

/ ip firewall filter
add chain=forward connection-state=invalid action=drop comment=”drop invalid connections”
add chain=virus protocol=tcp dst-port=135-139 action=drop comment=”Drop Blaster Worm”
add chain=virus protocol=udp dst-port=135-139 action=drop comment=”Drop Messenger
Worm”
add chain=virus protocol=tcp dst-port=445 action=drop comment=”Drop Blaster Worm”

add chain=virus protocol=udp dst-port=445 action=drop comment=”Drop Blaster Worm”


add chain=virus protocol=tcp dst-port=593 action=drop comment=”________”
add chain=virus protocol=tcp dst-port=1024-1030 action=drop comment=”________”
add chain=virus protocol=tcp dst-port=1080 action=drop comment=”Drop MyDoom”
add chain=virus protocol=tcp dst-port=1214 action=drop comment=”________”
add chain=virus protocol=tcp dst-port=1363 action=drop comment=”ndm requester”
add chain=virus protocol=tcp dst-port=1364 action=drop comment=”ndm server”
add chain=virus protocol=tcp dst-port=1368 action=drop comment=”screen cast”
add chain=virus protocol=tcp dst-port=1373 action=drop comment=”hromgrafx”
add chain=virus protocol=tcp dst-port=1377 action=drop comment=”cichlid”
add chain=virus protocol=tcp dst-port=1433-1434 action=drop comment=”Worm”
add chain=virus protocol=tcp dst-port=2745 action=drop comment=”Bagle Virus”
add chain=virus protocol=tcp dst-port=2283 action=drop comment=”Drop Dumaru.Y”
add chain=virus protocol=tcp dst-port=2535 action=drop comment=”Drop Beagle”
add chain=virus protocol=tcp dst-port=2745 action=drop comment=”Drop Beagle.C-K”
add chain=virus protocol=tcp dst-port=3127-3128 action=drop comment=”Drop MyDoom”
add chain=virus protocol=tcp dst-port=3410 action=drop comment=”Drop Backdoor OptixPro”
add chain=virus protocol=tcp dst-port=4444 action=drop comment=”Worm”
add chain=virus protocol=udp dst-port=4444 action=drop comment=”Worm”
add chain=virus protocol=tcp dst-port=5554 action=drop comment=”Drop Sasser”
add chain=virus protocol=tcp dst-port=8866 action=drop comment=”Drop Beagle.B”
add chain=virus protocol=tcp dst-port=9898 action=drop comment=”Drop Dabber.A-B”
add chain=virus protocol=tcp dst-port=10000 action=drop comment=”Drop Dumaru.Y”
add chain=virus protocol=tcp dst-port=10080 action=drop comment=”Drop MyDoom.B”
add chain=virus protocol=tcp dst-port=12345 action=drop comment=”Drop NetBus”
add chain=virus protocol=tcp dst-port=17300 action=drop comment=”Drop Kuang2″
add chain=virus protocol=tcp dst-port=27374 action=drop comment=”Drop SubSeven”
add chain=virus protocol=tcp dst-port=65506 action=drop comment=”Drop PhatBot, Agobot,
Gaobot”
add chain=forward action=accept protocol=tcp dst-port=80 comment=”Allow HTTP”
add chain=forward action=accept protocol=tcp dst-port=25 comment=”Allow SMTP”
add chain=forward protocol=tcp comment=”allow TCP”
add chain=forward protocol=icmp comment=”allow ping”
add chain=forward protocol=udp comment=”allow udp”
add chain=forward action=drop comment=”drop everything else”
add chain=input src-address-list=”port scanners” action=drop comment=”dropping port
scanners” disabled=no

/ ip firewall filter add chain=virus protocol= udp dst-port=135 action=drop comment=”Confiker”


disabled=no

/ ip firewall filter add chain=virus protocol= udp dst-port=137 action=drop comment=”Confiker”


disabled=no

/ ip firewall filter add chain=virus protocol= udp dst-port=138 action=drop comment=”Confiker”


disabled=no

/ ip firewall filter add chain=virus protocol= udp dst-port=445 action=drop comment=”Confiker”


disabled=no

/ ip firewall filter add chain=virus protocol= tcp dst-port=135 action=drop comment=”Confiker”


disabled=no

/ ip firewall filter add chain=virus protocol= tcp dst-port=139 action=drop comment=”Confiker”


disabled=no

/ ip firewall filter add chain=virus protocol= tcp dst-port=5933 action=drop


comment=”Confiker” disabled=no

/ ip firewall filter add chain=virus protocol= tcp dst-port=445 action=drop comment=”Confiker”


disabled=no

/ ip firewall filter add chain=virus protocol= tcp dst-port=4691 action=drop


comment=”Confiker” disabled=no

1. Untuk filter brute forces


/ ip firewall filter
add chain=input protocol=tcp dst-port=22 src-address-list=ssh_blacklist action=drop
comment=”Drop SSH brute forcers” disabled=no
add chain=input protocol=tcp dst-port=22 connection-state=new src-address-list=ssh_stage3
action=add-src-to-address-list address-list=ssh_blacklist \
address-list-timeout=1w3d comment=”” disabled=no
add chain=input protocol=tcp dst-port=22 connection-state=new src-address-list=ssh_stage2
action=add-src-to-address-list address-list=ssh_stage3 \
address-list-timeout=1m comment=”” disabled=no
add chain=input protocol=tcp dst-port=22 connection-state=new src-address-list=ssh_stage1
action=add-src-to-address-list address-list=ssh_stage2 \
address-list-timeout=1m comment=”” disabled=no
add chain=input protocol=tcp dst-port=22 connection-state=new action=add-src-to-address-list
address-list=ssh_stage1 address-list-timeout=1m comment=”” \
disabled=no

2. Untuk filter port scaning


/ ip firewall filter
add chain=input protocol=tcp psd=21,3s,3,1 action=add-src-to-address-list address-list=”port
scanners” address-list-timeout=2w comment=”Port Scanners to list \
” disabled=no
add chain=input protocol=tcp tcp-flags=fin,!syn,!rst,!psh,!ack,!urg action=add-src-to-address-list
address-list=”port scanners” address-list-timeout=2w \
comment=”” disabled=no
add chain=input protocol=tcp tcp-flags=fin,syn action=add-src-to-address-list address-list=”port
scanners” address-list-timeout=2w comment=”” disabled=no
add chain=input protocol=tcp tcp-flags=syn,rst action=add-src-to-address-list address-list=”port
scanners” address-list-timeout=2w comment=”” disabled=no
add chain=input protocol=tcp tcp-flags=fin,psh,urg,!syn,!rst,!ack action=add-src-to-address-list
address-list=”port scanners” address-list-timeout=2w \
comment=”” disabled=no
add chain=input protocol=tcp tcp-flags=fin,syn,rst,psh,ack,urg action=add-src-to-address-list
address-list=”port scanners” address-list-timeout=2w comment=”” \
disabled=no
add chain=input protocol=tcp tcp-flags=!fin,!syn,!rst,!psh,!ack,!urg action=add-src-to-address-
list address-list=”port scanners” address-list-timeout=2w \
comment=”” disabled=no
add chain=input src-address-list=”port scanners” action=drop comment=”” disabled=no

3. Untuk filter port FTP


/ ip firewall filter
add chain=input protocol=tcp dst-port=21 src-address-list=ftp_blacklist action=drop
comment=”Filter FTP to Box” disabled=no
add chain=output protocol=tcp content=”530 Login incorrect” dst-limit=1/1m,9,dst-address/1m
action=accept comment=”” disabled=no
add chain=output protocol=tcp content=”530 Login incorrect” action=add-dst-to-address-list
address-list=ftp_blacklist address-list-timeout=3h comment=”” \
disabled=no

4. Untuk separate packet flag


/ ip firewall filter
add chain=forward protocol=tcp action=jump jump-target=tcp comment=”Separate Protocol into
Chains” disabled=no
add chain=forward protocol=udp action=jump jump-target=udp comment=”” disabled=no
add chain=forward protocol=icmp action=jump jump-target=icmp comment=”” disabled=no
5. Untuk blocking UDP taffik setan
/ ip firewall filter
add chain=udp protocol=udp dst-port=69 action=drop comment=”Blocking UDP Packet”
disabled=no
add chain=udp protocol=udp dst-port=111 action=drop comment=”” disabled=no
add chain=udp protocol=udp dst-port=135 action=drop comment=”” disabled=no
add chain=udp protocol=udp dst-port=137-139 action=drop comment=”” disabled=no
add chain=udp protocol=udp dst-port=2049 action=drop comment=”” disabled=no
add chain=udp protocol=udp dst-port=3133 action=drop comment=”” disabled=no

6. Untuk blocking tcp traffik setan


/ ip firewall filter
add chain=tcp protocol=tcp dst-port=69 action=drop comment=”Bloking TCP Packet”
disabled=no
add chain=tcp protocol=tcp dst-port=111 action=drop comment=”” disabled=no
add chain=tcp protocol=tcp dst-port=119 action=drop comment=”” disabled=no
add chain=tcp protocol=tcp dst-port=135 action=drop comment=”” disabled=no
add chain=tcp protocol=tcp dst-port=137-139 action=drop comment=”” disabled=no
add chain=tcp protocol=tcp dst-port=445 action=drop comment=”” disabled=no
add chain=tcp protocol=tcp dst-port=2049 action=drop comment=”” disabled=no
add chain=tcp protocol=tcp dst-port=12345-12346 action=drop comment=”” disabled=no
add chain=tcp protocol=tcp dst-port=20034 action=drop comment=”” disabled=no
add chain=tcp protocol=tcp dst-port=3133 action=drop comment=”” disabled=no
add chain=tcp protocol=tcp dst-port=67-68 action=drop comment=”” disabled=no

7. Untuk bloking bukis mail traffic


/ ip firewall filter
add chain=forward protocol=tcp dst-port=25 action=drop comment=”Allow SMTP” disabled=no

8. Untuk membuat filter DOS


/ ip firewall filter
add chain=icmp protocol=icmp icmp-options=0:0-255 limit=5,5 action=accept
comment=”Limited Ping Flood” disabled=no
add chain=icmp protocol=icmp icmp-options=3:3 limit=5,5 action=accept comment=””
disabled=no
add chain=icmp protocol=icmp icmp-options=3:4 limit=5,5 action=accept comment=””
disabled=no
add chain=icmp protocol=icmp icmp-options=8:0-255 limit=5,5 action=accept comment=””
disabled=no
add chain=icmp protocol=icmp icmp-options=11:0-255 limit=5,5 action=accept comment=””
disabled=no
add chain=icmp protocol=icmp action=drop comment=”” disabled=no

9. Yntuk membuat fileter koneksi P2P


/ ip firewall filter
add chain=forward p2p=all-p2p action=accept comment=”trafik P2P ” disabled=no
10. Untuk membuat filter akses jalur mapping network
/ ip firewall filter
add chain=input dst-address-type=broadcast,multicast action=accept comment=”Allow
Broadcast Traffic” disabled=no
add chain=input src-address=192.168.0.0/28 action=accept comment=”Allow access to router
from known network” disabled=no
add chain=input src-address=192.168.1.0/24 action=accept comment=”” disabled=no
add chain=input src-address=192.168.2.0/30 action=accept comment=”” disabled=no
add chain=input src-address=125.162.0.0/16 action=accept comment=”” disabled=no

11. Untuk membuat filter koneksi junk dan jalur koneksi yang benar
/ ip firewall filter
add chain=input connection-state=established action=accept comment=”Connection State”
disabled=no
add chain=input connection-state=related action=accept comment=”” disabled=no
add chain=input connection-state=invalid action=drop comment=”” disabled=no

Das könnte Ihnen auch gefallen