如何使squild服务只能使用自定义的端口号

编辑配置文件: vim /etc/squid/squid.conf

                             http_port  10000

使用 setsebool 命令来限制 squild 服务只能使用自定义的端口: setsebool   -P  squid_connect_any  0

查看当前 SElinux 允许的服务端口: semanage port -l |grep  -w  -i  squid_port_t

添加 SElinux 对 10000 端口的允许: semanage  port -a  -t  squid_port_t   -p  tcp 10000

                                                          semanage   port -l  | grep  -w  -i  squid_port_t

重启squid服务程序后即可生效: syetemctl restart squid

posted @ 2018-10-24 14:32  ~小学生~  阅读(364)  评论(0编辑  收藏  举报