

اعدادت الفايرول




بالنسبة للرولات انت ماعليك الا انك تاخد كوبى وباست فى النيو تيرمنال
وخد بالك جدا من النقطة دى الاجهزة المتفيرسة سيتم عزلها فى الصورة دى

للتحميل
المصدر: منتديات ايجي فاير-egyfire - من قسم: قسم سيرفرات المايكروتك - MikroTik server
Mikrotik network monitor | Mikrotik Sirver | مدونة مايكروتك العرب | شرح سرفر المايكروتك | دروس مايكروتك | رولات مايكروتك | التحكم في الشبكات | وايرلس | التحكم في الشبكه اللاسلكيه































/ip firewall mangle
add action=mark-connection chain=input comment="" disabled=no in-interface=\
in1 new-connection-mark=in1_conn passthrough=yes
add action=mark-connection chain=input comment="" disabled=no in-interface=\
in2 new-connection-mark=in2_conn passthrough=yes
add action=mark-routing chain=output comment="" connection-mark=in1_conn \
disabled=no hotspot=auth new-routing-mark=in1 passthrough=yes
add action=mark-routing chain=output comment="" connection-mark=in2_conn \
disabled=no hotspot=auth new-routing-mark=in2 passthrough=yes
add action=mark-connection chain=prerouting comment="" disabled=no \
dst-address-type=!local in-interface=out new-connection-mark=in1_conn \
passthrough=yes per-connection-classifier=both-addresses-and-ports:2/0
add action=mark-connection chain=prerouting comment="" disabled=no \
dst-address-type=!local in-interface=out new-connection-mark=in2_conn \
passthrough=yes per-connection-classifier=both-addresses-and-ports:2/1
add action=mark-routing chain=prerouting comment="" connection-mark=in1_conn \
disabled=no in-interface=out new-routing-mark=in1 passthrough=yes
add action=mark-routing chain=prerouting comment="" connection-mark=in2_conn \
disabled=no in-interface=out new-routing-mark=in2 passthrough=yes/ip firewall nat
add action=passthrough chain=unused-hs-chain comment=\
"place hotspot rules here" disabled=yes
add action=masquerade chain=srcnat comment="" disabled=no out-interface=in1
add action=masquerade chain=srcnat comment="" disabled=no out-interface=in2
add action=masquerade chain=srcnat comment="masquerade hotspot network" \
disabled=no src-address=10.0.0.0/24/ip route
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
192.168.2.1 routing-mark=in2 scope=30 target-scope=10
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
192.168.1.1 scope=30 target-scope=10
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
192.168.1.1 routing-mark=in1 scope=30 target-scope=10
add check-gateway=ping disabled=no distance=2 dst-address=0.0.0.0/0 gateway=\
192.168.2.1 scope=30 target-scope=10/ip hotspot user profile
set default idle-timeout=none keepalive-timeout=2m name=default shared-users=\
1 status-autorefresh=1m transparent-proxy=no
add advertise=no idle-timeout=none keepalive-timeout=2m name=1024 \
open-status-page=always rate-limit=400k/1024k shared-users=1 \
status-autorefresh=1m transparent-proxy=yes
add idle-timeout=none keepalive-timeout=2m name=512 rate-limit=256K/600K \
shared-users=1 status-autorefresh=1m transparent-proxy=no
add advertise=no idle-timeout=none keepalive-timeout=2m name=256 \
open-status-page=always rate-limit=512K/400K shared-users=1 \
status-autorefresh=1m transparent-proxy=yes
add idle-timeout=none keepalive-timeout=2m name=128 rate-limit=64K/128K \
shared-users=1 status-autorefresh=1m transparent-proxy=no
add idle-timeout=none keepalive-timeout=2m name=2048 rate-limit=512K/1024K \
shared-users=1 status-autorefresh=1m transparent-proxy=no
add advertise=yes advertise-interval=0s advertise-timeout=immediately \
advertise-url=http://10.0.0.2/hotspot/stopmember.html idle-timeout=2m \
keepalive-timeout=none name=ENDED open-status-page=always rate-limit=\
256k/512k shared-users=3 status-autorefresh=1m transparent-proxy=yes








/interface set ether1 name=W1
set ether2 name=W2
set ether3 name=W3
set ether4 name=W4
set ether5 name=L
/ ip address
add address=50.50.50.1/24 interface=L comment=L
add address=192.168.1.2/24 interface=W1 comment=1
add address=192.168.2.2/24 interface=W2 comment=2
add address=192.168.3.2/24 interface=W3 comment=3
add address=192.168.4.2/24 interface=W4 comment=4
/ ip firewall mangle
add chain=input in-interface=W1 action=mark-connection new-connection-mark=W1_conn
add chain=input in-interface=W2 action=mark-connection new-connection-mark=W2_conn
add chain=input in-interface=W3 action=mark-connection new-connection-mark=W3_conn
add chain=input in-interface=W4 action=mark-connection new-connection-mark=W4_conn
add chain=output connection-mark=W1_conn action=mark-routing new-routing-mark=W1
add chain=output connection-mark=W2_conn action=mark-routing new-routing-mark=W2
add chain=output connection-mark=W3_conn action=mark-routing new-routing-mark=W3
add chain=output connection-mark=W4_conn action=mark-routing new-routing-mark=W4
add chain=prerouting dst-address-type=!local in-interface=L per-connection-classifier=both-addresses-and-ports:4/0 action=mark-connection new-connection-mark=W1_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=L per-connection-classifier=both-addresses-and-ports:4/1 action=mark-connection new-connection-mark=W2_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=L per-connection-classifier=both-addresses-and-ports:4/2 action=mark-connection new-connection-mark=W3_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=L per-connection-classifier=both-addresses-and-ports:4/3 action=mark-connection new-connection-mark=W4_conn passthrough=yes
add chain=prerouting connection-mark=W1_conn in-interface=Local action=mark-routing new-routing-mark=W1
add chain=prerouting connection-mark=W2_conn in-interface=Local action=mark-routing new-routing-mark=W2
add chain=prerouting connection-mark=W3_conn in-interface=Local action=mark-routing new-routing-mark=W3
add chain=prerouting connection-mark=W4_conn in-interface=Local action=mark-routing new-routing-mark=W4
/ ip route
add dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-mark=W1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.2.1 routing-mark=W2 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.3.1 routing-mark=W3 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.4.1 routing-mark=W4 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.1.1 distance=1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.2.1 distance=2 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.3.1 distance=3 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.4.1 distance=4 check-gateway=ping
/ ip firewall nat
add chain=srcnat out-interface=W1 action=masquerade
add chain=srcnat out-interface=W2 action=masquerade
add chain=srcnat out-interface=W3 action=masquerade
add chain=srcnat out-interface=W4 action=masquerade
/ip dns
set allow-remote-requests=no cache-max-ttl=1w cache-size=2048KiB max-udp-packet-size=512 servers=8.8.8.8,8.8.4.4
/ip pool
add name=POOL ranges=50.50.50.2-50.50.50.254
/ip dhcp-server
add address-pool=POOL authoritative=after-2sec-delay bootp-support=static disabled=no interface=Local lease-time=3d name=DHCP
/ip dhcp-server config
set store-leases-disk=5m
/ip dhcp-server network
add address=50.50.50.0/24 comment="" dns-server=8.8.8.8,8.8.4.4 gateway=50.50.50.1
/queue type
set default-small kind=pcq name=default-small pcq-classifier=
src-address,dst-address pcq-limit=50 pcq-rate=0 pcq-total-limit=2000























