0

I am setting up a company intranet (extranet) and need to block all traffic requesting to the portal besides anyone connected to our VPN.

What I've tried

I've tried adding this to /etc/apache2/httpd.conf

<Directory /var/www/portal>
    Order deny,all
    Deny all
    Allow from <ip>
</Directory>

What's happening is nothing. Not traffic is being blocked.

We are using Ubuntu as the server, and Apache2 as our webserver. We are using certbot to create the SSL cert (not sure if this helps or changes things.)

1 Answer 1

0

A few things to check:

  • First question is did you reload or restart Apache after changing the configuration?
  • Since you are using Ubuntu, you may also want to take a look at the /etc/apache2/sites-enabled directory and see if anything in there is overriding your /etc/apache2/httpd.conf configuration.
  • Are you sure /etc/apache2/httpd.conf is being included? On recent Debian versions (which Ubuntu uses as a base), if you are using the distribution packages, it loads /etc/apache2/apache2.conf which has Include for several other .conf files, but not httpd.conf.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy