周杰个人博客
周杰个人博客

openwrt 禁局域网内设备访问外网

内容纲要

This file is interpreted as shell script.

Put your custom iptables rules here, they will

be executed with each firewall (re-)start.

Internal uci firewall chains are flushed and recreated on reload, so

put custom rules into the root chains e.g. INPUT or FORWARD or into the

special user chains, e.g. input_wan_rule or postrouting_lan_rule.

iptables -t nat -A PREROUTING -p udp --dport 53 -j REDIRECT --to-ports 53
iptables -t nat -A PREROUTING -p tcp --dport 53 -j REDIRECT --to-ports 53
iptables -I FORWARD -m mac --mac-source c4:9f:4c:10:54:9b -j DROP
iptables -I FORWARD -m mac --mac-source 20:39:56:5c:f4:57 -j DROP
iptables -I FORWARD -m mac --mac-source 60:21:01:9f:0d:83 -j DROP
iptables -I FORWARD -m mac --mac-source 14:bd:61:cc:aa:4c -j DROP
iptables -I FORWARD -m mac --mac-source 7c:76:68:e0:98:4c -j DROP
iptables -I FORWARD -m mac --mac-source 3c:b6:b7:f6:f7:d7 -j DROP
iptables -I FORWARD -m mac --mac-source 1c:40:e8:11:a1:10 -j DROP

赞赏
  • 注意:本站资源多为网络收集,如涉及版权问题请及时与站长联系,我们会在第一时间内删除资源。
  • 本站用户发帖仅代表本站用户个人观点,并不代表本站赞同其观点和对其真实性负责。
  • 本站资源大多存储在云盘,如发现链接失效,请及时与站长联系,我们会第一时间更新。
文章标题:openwrt 禁局域网内设备访问外网
本文地址:https://www.zhoujie218.top/archives/988.html
转载本网站任何内容,请按则和转载方式正确书写本站原文地址

发表评论

textsms
account_circle
email

周杰个人博客

openwrt 禁局域网内设备访问外网
This file is interpreted as shell script. Put your custom iptables rules here, they will be executed with each firewall (re-)start. Internal uci firewall chains are flushed a…
扫描二维码继续阅读
2019-11-25