All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
How to access server resources with OpenVPN connection.
First post - I apologize if I'm missing something obvious.
I have an OpenVZ container running Ubuntu 12.04, CSF and OpenVPN-AS. I also have some apps running on various ports (8081, 9090, etc). As of right now I have configured CSF to open those ports publicly so I can access them, however my hope was to shut off access to those with the firewall and require an OpenVPN connection to access them. That's where I'm stuck. I can connect via OpenVPN, my traffic is tunneled (I can see that my WAN IP has changed) but I can't figure out how to access those apps while connected.
I know my VPS's WAN IP address, I know the IP address OpenVPN assigns to me, but what am I suppose to use to access resources running on the VPS while connected?
Any pointers would be appreciated, and again sorry if it's something simple.
Comments
Everyone has questions. I am assuming that WAN in this context means the Internet. Try connecting with the IP address of the OpenVPN server interface (default'ish
10.8.0.1
). Or tryipconfig
to find the address.Here's an example of my output.
Your interface will be called tap0 or tun0. Then take a look at
inet addr:
. Mine is10.8.0.1
.Thanks for your reply Silvenga. So I ran
ifconfig
:I assume mine is a bit different than yours because I'm running OpenVPN-AS - but I started testing out some of the IPs found in the results and landed on 5.5.0.1 - with that address I can connect to all of the ports I want while connected via OpenVPN. Does that make sense? It's a fresh VPS and I just followed the very simple steps at: https://www.digitalocean.com/community/articles/how-to-install-openvpn-access-server-on-ubuntu-12-04 to set up OpenVPN-AS. Just want to get a second opinion on whether this is typical or if something went haywire with my setup.
Thanks again for the help.
Wouldn't it be easier to SSH tunnel? Or are you using a VPN for data encryption?
Yeah SSH tunnel works fine, that's what I was using. I setup OpenVPN primarily to be used for encryption/privacy but I like the convenience of also being able to connect to the services on the VPS server while connected.
That's what I assumed, encryption purposes.
Unrelated: It's bad to use public IP space for private networking.
Yeah I installed an older version of OpenVPN-AS that used 5.5.16.0/20 for clients - I guess later versions use 172.27.240.0/20. Just updated it, thanks for pointing that out.
Yeah, my anti-spam is still blocking the 5.0.0.0 block (was a private'ish subset). Still need to fix that - although all I get is spam from those address.
Everything should look a bit different. I ran
ifconfig
on my personal box, and you ran it on a OpenVZ container.The interface
as0t0
appears to be the root of the private network. The other 6 shouldn't be needed (just allocated by AS for scalability). The5.5.0.1
address appears to be correct (hopefully now it's in one of the private subsets). Make sure you set up the Firewall correctly (not all firewalls run correctly on OpenVZ).Everything looks good and welcome to LowEndTalk!
Thank you all for the help.
So, just in case anyone needs to know this in the future...
While running OpenVPN-AS version 2.0 or greater, the default IP address of the access server is
172.27.224.1
. For earlier version of OpenVPN-AS, the address is5.5.0.1
.