You are not logged in.
Hello archers,
I got two servers, A and B. I want B to run an application with outgoing and incoming taffic and I want it to tunnel all that traffic through A.
I know I could archive this with OpenVPN. Port forwarding would be easy. But to my knowledge that would mean that ALL traffic from B is routed thorugh A. Exceptions can only be specified by IP-ranges, not ports nor applications. That's not a feasable solution, as B is also running a webserver that need's to be accessable directly and I don't want those connections to be routed through A aswell.
To my understanding there is no way of using OpenVPN to route all traffic from B thtough A but not traffic on port 80.
That's why I am looking at proxy servers. Well, is there a proxy server that supports port forwarding?
Basically all I want is traffic on one Port to be routed completly from B thtough A (both directions) and traffic on another port to be direct connecitons to B.
Hope anybody can point me in a direction to archive this. Thanks.
Last edited by StR@ng3r (2013-05-26 19:32:20)
Offline
If you stay on OpenVPN, you may use iptables mangle table to mark the packets from the used port and then install a new route based on these packets.
Last edited by Tarqi (2013-05-26 21:22:06)
Knowing others is wisdom, knowing yourself is enlightenment. ~Lao Tse
Offline
What you need is Policy Based Routing. I wrote a script to help achieve this [1] but a Google/DDG search should help point you in the right directions.
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Holy shit, that stuff is complicated. Isn't there like an SOCKS-Proxy or something that allows port forwarding?
That way I could just sockify the application that traffic I want to route through A. But that will only work if A can also route incoming connections to B. So I would require a port forwarding setup. Just havn't found an answer to wether thhis can be achieved with a SOCKS-Proxy.
Offline
Yes it is complicated, but you can't make an application use a SOCKS proxy if it doesn't know how to so you have to get the kernel to handle the routing instead.
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline