xuxi3201 发表于 2016-5-16 00:12:59

只标记connection-state=new有问题吗?

# 1标记内网出的连接
/ip firewall mangle
add action=mark-connection chain=prerouting comment=\
    "\B1\EA\BC\C7\C1\AA\CD\A8\C1\AC\BD\D31" connection-state=new disabled=no \
    in-interface=ether1 new-connection-mark=unicom_conn1 passthrough=yessrc-address-list=unicom1

add action=mark-connection chain=prerouting comment=\
    "\B1\EA\BC\C7\B5\E7\D0\C51\C1\AC\BD\D3" connection-state=new disabled=no \
    in-interface=ether1 new-connection-mark=tel1_conn passthrough=yes src-address-list=tel1

add action=mark-connection chain=prerouting comment=\
    "\B1\EA\BC\C7\B5\E7\D0\C52\C1\AC\BD\D3" connection-state=new disabled=no \
    in-interface=ether1 new-connection-mark=tel2_conn passthrough=yes \
src-address-list=tel2

#2标记外网进入的连接(避免影响外网到内网不同IP段的映射)
/ip firewall mangle
add action=mark-connection chain=input comment=\
    "\B1\EA\BC\C7\B5\E7\D0\C5\CF\DF1\BD\F8\C8\EB\B5\C4\C1\AC\BD\D3" \
    connection-state=new disabled=no in-interface=ether2 new-connection-mark= tel1_conn passthrough=yes

add action=mark-connection chain=input comment=\
    "\B1\EA\BC\C7\B5\E7\D0\C5\CF\DF2\BD\F8\C8\EB\B5\C4\C1\AC\BD\D3" \
    connection-state=new disabled=no in-interface=ether3 new-connection-mark=tel2_conn passthrough=yes

#    3标记路由
/ip firewall mangle
add action=mark-routing chain=prerouting comment=\
    "\B1\EA\BC\C7\B5\E7\D0\C51\C2\B7\D3\C9" connection-mark=tel1_conn \
    disabled=no in-interface=ether1 new-routing-mark=tel1_route passthrough=yes

add action=mark-routing chain=prerouting comment=\
    "\B1\EA\BC\C7\B5\E7\D0\C52\C2\B7\D3\C9" connection-mark=tel2_conn \
    disabled=no in-interface=ether1 new-routing-mark=tel2_route passthrough=yes

add action=mark-routing chain=prerouting comment=\
    "\B1\EA\BC\C7\C1\AA\CD\A8\CF\DF\C2\B7\C2\B7\D3\C91" connection-mark=\
    unicom_conn1 disabled=no in-interface=ether1 new-routing-mark=unicom_route1 passthrough=yes


这个是几年前的,
他加上了connection-state=new,是不是效果更好?



cspm333 发表于 2016-5-16 00:25:16

不會比較好...

除非您是做nth負載平衡,必定要加的,
不然是不需要在mark-connetion刻意標connection-state=new

加了連線只會出包 ,畫蛇添足罷了:(

xuxi3201 发表于 2016-5-16 17:21:50

下面截图,获得的连接都是无效的。

xuxi3201 发表于 2016-5-16 17:23:47

下面的截图, 连接都是有效的。
所以 ,
/ip firewall mangle
add chain=inputdst-address-type=local src-address=192.168.0.0/16
这一句,应该加上。是不是?
页: [1]
查看完整版本: 只标记connection-state=new有问题吗?