Monthly Archives: October 2020

The Portmapper service runs on port 111 tcp/udp

ss -lntp | grep 111

LISTEN 0 128 *:111 *:* users:(("rpcbind",pid=816,fd=8))
LISTEN 0 128 [::]:111 [::]:* users:(("rpcbind",pid=816,fd=11))

pcinfo -p
program vers proto port service
100000 4 tcp 111 portmapper
100000 3 tcp 111 portmapper
100000 2 tcp 111 portmapper
100000 4 udp 111 portmapper
100000 3 udp 111 portmapper
100000 2 udp 111 portmapper

systemctl stop rpcbind.socket
rpcinfo -p
rpcinfo: can't contact portmapper: RPC: Remote system error - Connection refused

systemctl disable rpcbind

nginx allow only index.php

upstream _php {
server unix:/var/run/php-fpm/php-fpm.sock;
}

server {
server_name 192.168.1.100;

root /path/to/root;
index index.php;

include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
location / { deny all; }
location = / { }
location = /index.php { fastcgi_pass _php; }

location /phpmyadmin/ { }
location ~ ^/phpmyadmin/.*\.php$ { fastcgi_pass _php; }
}