عبد الله مسعد
2017/08/07, 10:13 PM
محتاج طلب بسيط عندى ***** دامج عليه 2 خط كنت عايز اضيف كمان خط
بحيث يكونو 3 خطوط علما مش عايز احذف الاعدادات ال موجوده وعايز اكمل عليها ودا الرول اللى دامج بيه خطين
ياريت حد يكمل معايا باقي الدمج يدوى
/ip address
add address=10.50.0.1/24 broadcast=10.50.0.255 comment="" disabled=no \
interface=out network=10.0.0.0
add address=192.168.1.2/24 broadcast=192.168.1.255 comment="" disabled=no \
interface=in1 network=192.168.1.0
add address=192.168.2.2/24 broadcast=192.168.2.255 comment="" disabled=no \
interface=in2 network=192.168.2.0
/ip dns
set allow-remote-requests=yes cache-max-ttl=1w cache-size=2048KiB \
max-udp-packet-size=512 primary-dns=8.8.8.8 secondary-dns=\
8.8.4.4
/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="masquerade hotspot network" \
disabled=no src-address=10.50.0.0/24
/ip route
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=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 comment="" disabled=no distance=2 dst-address=\
0.0.0.0/0 gateway=192.168.2.1 scope=30 target-scope=10
set accounting=yes default-group=read interim-update=0s use-radius=no
بحيث يكونو 3 خطوط علما مش عايز احذف الاعدادات ال موجوده وعايز اكمل عليها ودا الرول اللى دامج بيه خطين
ياريت حد يكمل معايا باقي الدمج يدوى
/ip address
add address=10.50.0.1/24 broadcast=10.50.0.255 comment="" disabled=no \
interface=out network=10.0.0.0
add address=192.168.1.2/24 broadcast=192.168.1.255 comment="" disabled=no \
interface=in1 network=192.168.1.0
add address=192.168.2.2/24 broadcast=192.168.2.255 comment="" disabled=no \
interface=in2 network=192.168.2.0
/ip dns
set allow-remote-requests=yes cache-max-ttl=1w cache-size=2048KiB \
max-udp-packet-size=512 primary-dns=8.8.8.8 secondary-dns=\
8.8.4.4
/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="masquerade hotspot network" \
disabled=no src-address=10.50.0.0/24
/ip route
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=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 comment="" disabled=no distance=2 dst-address=\
0.0.0.0/0 gateway=192.168.2.1 scope=30 target-scope=10
set accounting=yes default-group=read interim-update=0s use-radius=no