How To Secure Apache Proxy Server (mod_proxy)

Q. I’ve proxy (mod_proxy) enabled for Apache under Debian Linux 4.0 server. I’d like to use this to improve performance, but I don’t want an open proxy that can be used by anyone on the Internets? How do I secure my proxy as limiting access is essential as I’m using a forward proxy?

A. You can easily restrict proxy access to single domain, IP or subnet.

ADVERTISEMENTS

Forward proxy example

You can control who can access your proxy via the <Proxy> control block. Use configuration as follows to allow access from your-domain.com only:

<Proxy *>
   Order deny,allow
   Deny from all
   Allow from your-domain.com
</Proxy>

OR allow access from 10.1.5 only

<Proxy *>
   Order deny,allow
   Deny from all
   Allow from 10.1.5
</Proxy>

Further readings:

🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallCentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNCentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
1 comment… add one
  • Milan Jun 4, 2008 @ 8:03

    I want to how to build new kenrel through complete process

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.