goneyes
V2EX  ›  路由器

如何在 LEDE 上添加 iptables 规则转发到内网 Squid?

  •  
  •   goneyes · Sep 2, 2017 · 5665 views
    This topic created in 3206 days ago, the information mentioned may be changed or developed.

    拓扑结构为网关为 192.168.2.1,网关上装有 OPENVPN 服务器端,采用 TCP 隧道,设有子网 10.8.0.0/24 ; 内网设有 squid,地址外 192.168.2.146:3128,采用正向代理,供部分机器连接外网用。

    默认不添加 iptables 规则,手机 openvpn 客户端能正常访问局域网内机器,但添加规则 iptables -t nat -I PREROUTING -s 10.8.0.0/24 -p tcp --dport 80 -j DNAT --to-destination 192.168.2.146:3128 后,不能访问局域网内机器,进入了 squid 错误页面,提示无效 url ? 请高手解答,顺便提供正确的 iptables 规则给小弟,谢谢!

    2 replies    2018-08-06 17:04:16 +08:00
    goneyes
        1
    goneyes  
    OP
       Sep 2, 2017 via Android
    求教大侠们!
    agu
        2
    agu  
       Aug 6, 2018 via Android
    有同样的问题,找到解决方法了吗?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1049 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 23:04 · PVG 07:04 · LAX 16:04 · JFK 19:04
    ♥ Do have faith in what you're doing.