04 February 2011

دمج خطين على النسخة 2.9.27

لدمج خطين لماكروتك فيرجن 2.9 لمصدرين انترنت

المصدر الاول 85.31.88.1 للانترفيس In_Wan1
والمصدر الثاني 86.62.23.1 للانترفيس In_Wan2
للحصول على 192.168.0.1 للانترفيس Out_Lan
تتم اضافة العبارات التالية من النيو تيرمنال



/ ip address
add address=192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255 interface=Out_Lan comment="" \
disabled=no
add address=85.31.88.2/24 network=85.31.88.0 broadcast=85.31.88.255 interface=In_Wan1 \
comment="" disabled=no
add address=86.62.23.2/24 network=86.62.23.0 broadcast=86.62.23.255 interface=In_Wan2 \
comment="" disabled=no



/ ip firewall mangle
add chain=prerouting in-interface=Out_Lan connection-state=new nth=1,1,0 \
action=mark-connection new-connection-mark=odd passthrough=yes comment="" \
disabled=no
add chain=prerouting in-interface=Out_Lan connection-mark=odd action=mark-routing \
new-routing-mark=odd passthrough=no comment="" disabled=no
add chain=prerouting in-interface=Out_Lan connection-state=new nth=1,1,1 \
action=mark-connection new-connection-mark=even passthrough=yes comment="" \
disabled=no
add chain=prerouting in-interface=Out_Lan connection-mark=even action=mark-routing \
new-routing-mark=even passthrough=no comment="" disabled=no



/ ip firewall nat
add chain=srcnat connection-mark=odd action=src-nat to-addresses=85.31.88.2 \
to-ports=0-65535 comment="" disabled=no
add chain=srcnat connection-mark=even action=src-nat to-addresses=86.62.23.2 \
to-ports=0-65535 comment="" disabled=no


/ ip route
add dst-address=0.0.0.0/0 gateway=85.31.88.1 scope=255 target-scope=10 routing-mark=odd \
comment="" disabled=no
add dst-address=0.0.0.0/0 gateway=86.62.23.1 scope=255 target-scope=10 routing-mark=even \
comment="" disabled=no
add dst-address=0.0.0.0/0 gateway=86.62.23.1 scope=255 target-scope=10 comment="" \
disabled=no

مع مراعاة الغاء الاعدادات السابقة للـ:
ip-firewall-nat
ip-routes

No comments: