Tag: Policy-based

Unix Like, 操作系统, 网络

Fix Ubuntu policy-based route with fwmark not work

近期发现Ubuntu基于ip rule add fwmark … lookup …所做的策略路由无法正常使用,而Debian正常。抓包的特征就是,出网数据包能应用到策略路由,也能抓到回应的数据包,但回应的数据包被内核丢弃,不会送达user space。 而ip rule add from … lookup …则正常。 查找资料得知是rp_filter的影响(见此:https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt),继而发现Ubuntu的/etc/sysctl.d是有 […]

Read more
Unix Like, VPN, 操作系统, 网络

Linux Policy-based site-to-site IPsec VPN动态IP的配置及内网穿透的应用(StrongSwan)

上一篇文章提到了一点StrongSwan的配置。 本文继续使用StrongSwan。 StrongSwan的left和right是支持使用域名的,利用此可以实现动态IP的支持;上一篇文章用了type=transport模式转发UDP端口构建L2TPv3,如果没有L2组网的需求,其实可以直接利用type=tunnel模式实现L3转发。 网络拓扑: 上图中的路由器lan-router1和lan-router2都是通过pppoe接入互联网的,域名lan-router1.router和lan-router2.router通过ddns分别解析到了各自pppoe0的IP地址上;server1和server […]

Read more