|
发表于 2007-2-24 22:11:11
|
显示全部楼层
这是配置脚本。
/ip address add address=192.168.10.254/255.255.255.0 interface=lan-1 comment=lan
/ip dns set allow-remote-requests=yes cache-max-ttl=1w cache-size=2048KiB max-udp-packet-size=512 servers=8.8.8.8,8.8.4.4
/ip address add address=192.168.0.254/255.255.255.0 interface=wan-1
/ip address add address=192.168.3.250/255.255.255.0 interface=wan-2
/ ip firewall mangle
add chain=prerouting dst-address-type=!local in-interface=lan-1 per-connection-classifier=both-addresses:2/0
action=mark-connection new-connection-mark=1st_conn passthrough=yes comment=" CC1"
add chain=prerouting connection-mark=1st_conn in-interface=lan-1 action=mark-routing new-routing-mark=1st_route
add chain=prerouting dst-address-type=!local in-interface=lan-1 per-connection-classifier=both-addresses:2/1
action=mark-connection new-connection-mark=2st_conn passthrough=yes comment=" CC2"
add chain=prerouting connection-mark=2st_conn in-interface=lan-1 action=mark-routing new-routing-mark=2st_route
add chain=input in-interface=wan-1 action=mark-connection new-connection-mark=1st_conn
add chain=input in-interface=wan-2 action=mark-connection new-connection-mark=2st_conn
add chain=output connection-mark=1st_conn action=mark-routing new-routing-mark=1st_route
add chain=output connection-mark=2st_conn action=mark-routing new-routing-mark=2st_route
/ip route
add comment="" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=
192.168.0.1 routing-mark=1st_route
add comment="" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=
192.168.3.254 routing-mark=2st_route
/ip firewall nat
add action=masquerade chain=srcnat comment=1 out-interface=wan-1
add action=masquerade chain=srcnat comment=2 out-interface=wan-2 |
|