0

I'm at my wits end as to how I can possibly accomplish this goal. When you install OpenVPN Access Server you can manage everything over at https:/ /my.ip.address:port/

My problem is that I want to make sure that https:/ /my.ip.address:port/ can only be accessed by a specific IP - my own IP. I just want the OpenVPN web interface to be accessible by my IP. How may I accomplish that?

6
  • I'm not exactly sure how the access server is serving the http pages, but if you find the root folder, try adding a .htaccess file with the following content: order deny,allow deny from all allow from YOUR.IP.HE.RE That should be enough to restrict access.
    – noleti
    Jul 13, 2014 at 3:17
  • Thanks for your reply @noleti, I unfortunately tried that solution to no avail :( Jul 13, 2014 at 23:47
  • Didn't know OpenVPN could be managed through http. Are you sure you can connect to it from other box and it's not just listening on 127.0.0.1 netstat -an | grep PORT#
    – meccooll
    Jul 14, 2014 at 2:02
  • Michel: is Access server using apache, or how are the pages served? Please provide a bit more info. Also, please make sure that the .htaccess is correctly formatted, the two commands should be in separate lines, and you need to replace the YOUR.IP.HE.RE with your IP address
    – noleti
    Jul 14, 2014 at 2:40
  • @noleti: I don't believe it uses either. I tried looking up what sort of web server it uses to no avail :( Jul 14, 2014 at 2:44

1 Answer 1

0

Assuming that you run UFW, do the following:

sudo ufw enable
sudo ufw allow from YOURIP to any port 443
sudo ufw deny 443

Please make sure that you don't lock yourself out of the machine while doing this. As your admin interface is running on a different port, you might need to replace the 443 above with your port number.

4
  • I appreciate your attempt to help me again! I do use UFW on all of my servers and I have tried setting this rule but it is still accessible to anyone. Thanks again for trying to help! Jul 14, 2014 at 20:11
  • Hi Michel, maybe there are conflicting ufw rules then. Make sure that you don't explicitly allow access to the port to everyone before. You can also post the ufw status here. Please also post your port number/ a port number to use in the example. Is it 443? I looked at you question again, it seems you only want to access the page from localhost. In that case, sudo ufw deny 443 definitely should block all remote access.
    – noleti
    Jul 14, 2014 at 23:36
  • Hi there mate, I've been able to successfully deny access to port 443 (SSL) but oddly I'm unable to allow my IP access. I'll double check again what in the world is going on with UFW! Jul 17, 2014 at 7:14
  • The order of the rules matters, the first matching rule is executed. Make sure to allow access first for your ip, then deny access for everyone elde
    – noleti
    Jul 17, 2014 at 8:05

You must log in to answer this question.

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