Installation is like this:
on server1, use
ssh -D server1:1080 root@server2 to setup a socks proxy.
meanwhile, on server1, there is an IPsec/xauth VPN server running with vpn network 192.168.42.0/24. Then laptop does VPN connect to server1.
After VPN connection, if I config laptop to use socks proxy server1:1080, the laptop can access server2 network through the SSH socks proxy successfully. But I hope to forward traffic from VPN network to server1:1080 transparently on server1 without config laptop to use socks proxy. I guess I should use iptables.