標題:
RB2011UiAS-2HnD —— Default firewall and nat rules (v6.42.12)
[打印本頁]
作者:
角色
時間:
2019-3-3 21:53
標題:
RB2011UiAS-2HnD —— Default firewall and nat rules (v6.42.12)
本帖最後由 角色 於 2019-3-4 13:28 編輯
The following are the default firewall and nat rules for the version of 6.42.12 using the following commands:
For exporting the filter rules:
ip firewall filter export
複製代碼
.
For example the nat rules
ip firewall nat export
複製代碼
.
filter rules:
/ip firewall filter
add action=accept chain=input comment=\
"defconf: accept established,related,untracked" connection-state=\
established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
invalid
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=drop chain=input comment="defconf: drop all not coming from LAN" \
in-interface-list=!LAN
add action=accept chain=forward comment="defconf: accept in ipsec policy" \
ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" \
ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
connection-state=established,related
add action=accept chain=forward comment=\
"defconf: accept established,related, untracked" connection-state=\
established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" connection-state=\
invalid
add action=drop chain=forward comment=\
"defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat \
connection-state=new in-interface-list=WAN
複製代碼
.
nat rules:
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" ipsec-policy=\
out,none out-interface-list=WAN
複製代碼
.
There are no rules for mangle and raw.
作者:
vpn-learner
時間:
2019-3-3 22:04
是否不同型号的Mikrotik router 的 default firewall rules 都不同的?我改了我以前的default rules 所以都不知是否一样?!
作者:
角色
時間:
2019-3-3 22:20
本帖最後由 角色 於 2019-3-3 22:22 編輯
真的不知道,估计应该差不多。
如果你要reset,建议你要在router附近做,不然reset完你就连不回去你的router。
CCR series default是没有rules的。
作者:
vpn-learner
時間:
2019-3-3 22:27
回復
3#
角色
我在官网找到以下 的default rules, 但是不了解跟楼上的default rules 功能上有什么不同?!
four basic firewall rules for mikrotik ros
[admin@MikroTik] /ip firewall filter> print
Flags: X - disabled, I - invalid, D - dynamic
0 ;;; default configuration
chain=input action=accept protocol=icmp
1 ;;; default configuration
chain=input action=accept connection-state=established
2 ;;; default configuration
chain=input action=accept connection-state=related
3 ;;; default configuration
chain=input action=drop in-interface=sfp1-gateway
4 ;;; default configuration
chain=input action=drop in-interface=ether1-gateway
5 ;;; default configuration
chain=input action=drop in-interface=ether2-gateway
[admin@MikroTik]
作者:
角色
時間:
2019-3-3 22:53
你上面的default settings是很久以前的rules,基本功能都是一样的,但是多了一些东西,如fasttrack and ipsec,还有网络优化。
歡迎光臨 電訊茶室 (http://telecom-cafe.com/forum/)
Powered by Discuz! 7.2