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

一台墙内的 openwrt 路由用 ss 翻,但通过 ss-server 和 ocserv 连接它的设备却不能翻?

  •  
  •   yaoppp · Sep 29, 2015 · 907 views
    This topic created in 3888 days ago, the information mentioned may be changed or developed.

    (之前发到了一个不存在的节点,烦请管理员删掉,谢谢)

    有一台 openwrt x86 路由,通过 ss 翻,同时还跑着 ss-server 和 ocserv 。手机或电脑通过 ss-server 或 ocserv 连接后也能正确获取到路由的外网 ip ,但是那些需要走 ss 的网站不能上。
    本人对 iptables 基本一窍不通,也不知道是不是这部分写的不对,或者说从原理上这两部分流量就不能通过 ss ?
    firewall 里是这么写的:
    ss

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

    iptables -A input_wan_rule -p tcp --dport 443 -j ACCEPT
    iptables -A input_wan_rule -p udp --dport 443 -j ACCEPT
    iptables -t nat -I POSTROUTING -s 192.168.100.0/24 -o pppoe-wan -j MASQUERADE
    iptables -I FORWARD -i vpns+ -s 192.168.100.0/24 -j ACCEPT
    iptables -I INPUT -i vpns+ -s 192.168.100.0/24 -j ACCEPT
    ss-server

    iptables -A input_wan_rule -p tcp --dport 8118 -j ACCEPT
    iptables -A input_wan_rule -p udp --dport 8118 -j ACCEPT

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2784 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 12:58 · PVG 20:58 · LAX 05:58 · JFK 08:58
    ♥ Do have faith in what you're doing.