小编Nic*_*ick的帖子

每用户路由似乎不起作用

所以,我正在尝试实现每用户路由,以便我能够通过 VPN 路由所有 btpd 种子流量。不幸的是,btpd 目前不允许您绑定到特定的 IP 地址。:(

我决定尝试遵循本指南

基本上,您标记任何数据包,然后对数据包执行 SNAT 或 DNAT 或 MASQUERADE,然后使用 ip 规则强制特定路由表。

最后,我的设置:

(To my router)
eth1  Link encap:Ethernet  HWaddr 00:0a:cd:18:8a:ae  
      inet addr:172.29.5.10  Bcast:172.29.5.255  Mask:255.255.255.0
      inet6 addr: fe80::20a:cdff:fe18:8aae/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:2073338425 errors:0 dropped:0 overruns:0 frame:0
      TX packets:2031270514 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:3014149031 (2.8 GiB)  TX bytes:1897259705 (1.7 GiB)
      Interrupt:17 Base address:0x6c00 

(my VPN)
tun0  Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
      inet addr:10.1.1.4  P-t-P:10.1.1.4  Mask:255.255.255.0
      UP POINTOPOINT …
Run Code Online (Sandbox Code Playgroud)

networking linux nat routing iptables

6
推荐指数
1
解决办法
1422
查看次数

标签 统计

iptables ×1

linux ×1

nat ×1

networking ×1

routing ×1