Results 1 to 9 of 9
so I have an external server and an internal server connected via OpenVPN. I'd like to expose specific services on the internal server (say, apache) to the internet via the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-09-2009 #1Just Joined!
- Join Date
- Aug 2008
- Location
- Seattle, WA
- Posts
- 46
expose VPN services to internet
so I have an external server and an internal server connected via OpenVPN. I'd like to expose specific services on the internal server (say, apache) to the internet via the external server. I have a feeling this should be a fairly simple task involving either iptables, squid or NAT but I'm not exactly sure how to do this.
anyone have a quick thought or tutorial link? I'd even accept a book title for something related to complex Linux networking config.
thanks,
-rb
- 07-09-2009 #2Just Joined!
- Join Date
- Jul 2009
- Posts
- 15
I think using squid or apache on the external server as a reverse proxy is the way to go here if you are considering web traffic. This way you are not permitting direct access to the internal server.
Is the external server already running a web server?
- 07-10-2009 #3Just Joined!
- Join Date
- Aug 2008
- Location
- Seattle, WA
- Posts
- 46
- 07-10-2009 #4Just Joined!
- Join Date
- Jul 2009
- Posts
- 15
Yes, mod_proxy would be the way to go I think. Give it a whirl and report back if you get stuck!
- 07-10-2009 #5Just Joined!
- Join Date
- Aug 2008
- Location
- Seattle, WA
- Posts
- 46
wow, its working great. now all I need to do is stress-test apache this evening. (its had some stability issues so I like to slap it around after changing configs / adding modules)
thanks
[edit] actually, this only works for HTTP. thats what I'm trying to do at the moment, but eventually, I may want to do this for non-HTTP protocols.
[edit2] if I have a line like:and I connect to example.com/tank, it attempts to connect to 192.168.10.1. however, if I add the trailing slash (example.com/tank/), then everything works correctly. I'm lazy and leave the trailing slash off frequently, so should I just alias things to add the slash? whats the reasoning behind this behavior?Code:ProxyPass /tank http://192.168.10.1/tank
- 07-10-2009 #6Just Joined!
- Join Date
- Aug 2008
- Location
- Seattle, WA
- Posts
- 46
- 07-10-2009 #7Just Joined!
- Join Date
- Jul 2009
- Posts
- 15
- 07-10-2009 #8Just Joined!
- Join Date
- Jul 2009
- Posts
- 15
- 07-15-2009 #9Just Joined!
- Join Date
- Aug 2008
- Location
- Seattle, WA
- Posts
- 46
well, if I do a line like
ProxyPass /nagios http://192.168.10.1/nagios3
I get cgi-bin errors. I dont think mod_proxy is doing exactly what I think it is because I'd expect the 192 address to be running the cgi and then returing the results over the proxy.
similarly, I'm having issues with a page that use AJAX. my requests make it to the server, but I dont ever see the server responses until I refresh.
I think this is what ProxyPassReverse was for, but I couldnt seem to get that to work either.


Reply With Quote

