Home>

There are 3 network interfaces on the server:

  • eth0-internet
  • tun1-openvpn-server(10.8.1.1/24)
  • tun2s1-tun2socks interface connected viaeth0(10.9.1.1/24)

I want traffic from tun1 to go through tun2s1.

Example scheme:Client -> tun1-> tun2s1-> eth0

If you run the commandcurl --interface tun2s1 http://site.com, then the request is made correctly, that istun2s1connected correctly. Connection problemtun1andtun2s1interfaces.

I've tried creating a new routing table and routing through it, but that hasn't worked yet either

With the help of tcpdump I monitor both tun interfaces, I see how packets 10.8.1.2 go to tun1 > 1.1.1.1, and on tun2s1 -1.1.1.1 > 10.8.1.2. But the vpn client still fails to ping

Commands:

ip route add 10.9.1.0/32 dev tun2s1 src 10.9.1.1 table admin
ip route add default via 10.9.1.1 dev tun2s1 table admin
ip rule add to 10.8.1.0/24 table admin
ip rule add from 10.8.1.0/24 table admin

Settings:

/ip_forward=1
*/rp_filter=0
*/accept_local=1