搜索

此内容没有您所选择的语言版本。

5.2.2. Protect portmap With IPTables

download PDF
To further restrict access to the portmap service, it is a good idea to add IPTables rules to the server and restrict access to specific networks.
Below are two example IPTables commands that allow TCP connections to the portmap service (listening on port 111) from the 192.168.0/24 network and from the localhost (which is necessary for the sgi_fam service used by Nautilus). All other packets are dropped.
 iptables -A INPUT -p tcp -s! 192.168.0.0/24 --dport 111 -j DROP iptables -A INPUT -p tcp -s 127.0.0.1 --dport 111 -j ACCEPT 
To similarly limit UDP traffic, use the following command.
 iptables -A INPUT -p udp -s! 192.168.0.0/24 --dport 111 -j DROP 

Note

Refer to Chapter 7, Firewalls for more information about implementing firewalls with IPTables commands.
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.