Openwrt开发之防火墙配置

openwrt防火墙支持uci接口配置

配置文件位于/etc/config/firewall

1. 允许ssh远程登录

config rule
    option name 'Allow-SSH'
    option target ACCEPT
    option src 'wan'
    option dest_port '22'
    option proto 'tcp'
    option family 'ipv4'

2. 允许http 80接口,这样openwrt的web界面就可以被外界访问

config rule
        option name 'Allow-http'
        option src              wan
        option dest_port        80
        option target           ACCEPT
        option proto            tcp

猜你喜欢

转载自www.cnblogs.com/weishengzhong/p/11362778.html