OpenWrt 是一个专门面向嵌入式设备的 Linux 发行版。你可以将 OpenWrt 支持的型号的嵌入式设备,比如各种路由器上的系统,换成一个有更多可能性可以折腾的 Linux 系统。
OpenWrt 官方网站
tunetoystory
V2EX  ›  OpenWrt

问一个 iptables 的问题~

  •  
  •   tunetoystory · Oct 29, 2014 · 1698 views
    This topic created in 4294 days ago, the information mentioned may be changed or developed.
    我参考这篇文章用 gfwlist 黑名单方式在路由器的客户端达到了自动代理的效果,但是在路由器上却不能下载需要代理的东西,比如说 wget https://autoproxy-gfwlist.googlecode.com/svn/trunk/gfwlist.txt

    我想用一个 cron 自动更新 dnsmasp 配置文件来着,貌似是文章中的这句命令把路由器本身排除了?

    ipset -N setmefree iphash
    iptables -t nat -A PREROUTING -p tcp -m set --match-set setmefree dst -j REDIRECT --to-port 1080

    有木有大神帮忙解惑。谢谢~
    6 replies    2014-10-30 09:57:34 +08:00
    emric
        1
    emric  
       Oct 29, 2014   ❤️ 1
    估计是表或者链不对, 还有 "这篇文章" 是那篇文章...
    tunetoystory
        2
    tunetoystory  
    OP
       Oct 29, 2014
    emric
        3
    emric  
       Oct 29, 2014   ❤️ 1
    很久没用 Linux 了, 回家翻了翻文档, 转发或以本地为目的 都会经过 NAT 表 PREROUTING 链.
    那就是说命令应该没有问题, 检查下配置试试?
    tunetoystory
        4
    tunetoystory  
    OP
       Oct 30, 2014 via Android
    @emric 我最终没找到原因~iptables 太复杂了~谢谢你
    jasontse
        5
    jasontse  
       Oct 30, 2014 via Android   ❤️ 1
    如果是路由器自己应该是 OUTPUT 链
    tunetoystory
        6
    tunetoystory  
    OP
       Oct 30, 2014
    @jasontse 谢谢,回去试试
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   869 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 21ms · UTC 21:10 · PVG 05:10 · LAX 14:10 · JFK 17:10
    ♥ Do have faith in what you're doing.