1

I have a root server and want to achieve that specific URLs should be under VPN control and some not. For example: www.mydomain.com or subdomain1.mydomain.com should not be under VPN control, [ip of my server]/pgadmin should be VPN controlled, so that only people inside the VPN network should be able to invoke this address. I also a little bit confused how the final result need to look, because if the public IP is 300.300.300.300/pgadmin, it should be blocked, but in VPN it is probably 10.0.0.1/pgadmin or something.

I'm not very familiar with VPN configuration, but is this possible? If yes, is this based on adding routes and IPTables? If not, how can I achieve the described issue?

2 Answers 2

1

It is possible.

There are different types of VPN software, using OpenVPN is probably one of the easiest. You can use OpenVPN to assign IP addresses to the VPN clients, and then you can use standard IPTABLES firewall rules (and/or rules in your server configuration) to control which IP's have access to what resources.

Once someone connects through an OpenVPN VPN, they will appear as coming from the address you assigned rather then their external IP address.

1
  • And you aboslutely need no openvpn for that and - cough - no ip tables at all. All what you need is reading the documentation of your web server.
    – TomTom
    Mar 16, 2014 at 9:45
0

THat has nothing to do with VPN and IP security at all - all it has to do is with basic web server security.

Basically:

/pgadmin should be accessible only from specific IP Addresses (which are the ones you hand out in your internal network and / or via VPN).

And any other address gets an access denied.

Simple, basic "security by IP" that is what you learn when you read the documentation of your web server (likely apache).

http://www.cyberciti.biz/faq/apache-restrict-access-based-on-ip-address-to-selected-directories/

has some documentations. It works with the httpg.conf file...

and entries look like this:

<Directory /var/www/sub/payroll/>
Order allow,deny
Allow from 192.168.1.0/24
Allow from 127
</Directory>
5
  • Ok, that means I only have to set up VPN and configure Apache, so no routing, IPTables at all. Is this correct?
    – Bevor
    Mar 16, 2014 at 9:54
  • No, that is not what I say. What I say is that this is done without crazy vpn setup. I am not here to debug a network confdiguration for which you have not even given any in depth explanations. ROuting may well be needed, depending how your network is set up.
    – TomTom
    Mar 16, 2014 at 9:56
  • It's ok, it's not a detailed question. I just wanted to know how to achieve my issue. My routing table doesn't have any private network addresses. So what is the topic about this please? "Adding a private network to a routing table"?
    – Bevor
    Mar 16, 2014 at 10:05
  • @Bevor Hardly. Per FAQ we do not handle beginner items here and setting up IP routing is "administrator for beginners".
    – TomTom
    Mar 16, 2014 at 10:07
  • Ok, let's assume there is a private network. I don't understand how I should access a private network by URL when I'm not accessing it by VPN? I miss a piece of the puzzle.
    – Bevor
    Mar 16, 2014 at 10:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .