Answer the question
In order to leave comments, you need to log in
How to restrict IP access to wp-login.php on server via iptables?
Hello.
I restrict access to wordpress through nginx:
location /wp-login.php {
allow 111.111.111.11;
allow 22.222.222.222;
deny all;
location ~ \.php$ {
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
include snippets/fastcgi-php.conf;
} }
Answer the question
In order to leave comments, you need to log in
Restricting access to a specific url is not the job of iptables, it does not have such functionality, and I hope it will not. Iptables does l4 filtering well, it doesn't need anything else. But if you really really want to restrict access to the directory through it, move the admin panel to a separate IP/port (for example, in the nginx config through a proxy) and filter this ip/port.
As an option, dpi, but filtering the URL on the web server through this technology is like a cannon on sparrows.
www.ntop.org/products/deep-packet-inspection/ndpi
you need to install advanced ipitables modules that can parse packets at a high axis level and already open and deny access there
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question