Domain hosting, buy domain names & web page promotion services
  

 Home

Red Hat Linux 8.0: The Official Red Hat Linux Security Guide
PrevChapter 5. Server SecurityNext

Securing Portmap

The portmap service is a dynamic port assignment daemon for RPC services such as NIS and NFS. It has weak authentication mechanisms and has the ability to assign a wide range of ports for the services it controls. For these reasons, it is difficult to secure.

If you are running RPC services, you should follow some basic rules.

Protect portmap With TCP Wrappers

It is important to use TCP wrappers to limit which networks or hosts have access to the portmap service since it has no built-in form of authentication.

Further, use only IP addresses when limiting access to the service. Avoid these hostnames as they can be more via DNS poisoning and other methods.

Protect portmap With iptables

To further restrict access to the portmap service, it is a good idea to add iptables rules to the server, restricting access to specific networks.

Below is an example of an iptables command that allows TCP connections to portmap, listening on port 111, from the 192.168.0/24 network exclusively. All other packets are dropped.

iptables -A INPUT -p tcp -s! 192.168.0.0/24  --dport 111 -j DROP

To similarly limit UDP traffic, use the following command.

iptables -A INPUT -p udp -s! 192.168.0.0/24  --dport 111 -j DROP

PrevHomeNext
Server SecurityUpSecuring NIS
 

 

 

 

Buy Cheap domains and domain register |  Cheap domain registration and transfer 

Disclaimer: For authoritative source or latest update to this documentation, please refer to http://www.redhat.com/docs/manuals/linux/

 
Quotes: Where so many hours have been spent in convincing myself that I am right, is there not some reason to fear I may be wrong?It is change, continuing change, inevitable change, that is the dominant factor in society today. No sensible decision can be made any longer without taking into account not only the world as it is, but the world as it will be. This, in turn, means that our statesmen, our businessmen, our everyman must take on a science fictional way of thinking.