代理服务器安全配置

来源:互联网 发布:广发东财大数据 编辑:程序博客网 时间:2024/04/29 21:34

代理服务器安全隔离,防止用户通过代理访问服务器本身其他端口

代理服务运行以ssuser权限运行

服务器地址ipv4 133.130.48.1 ipv6 ::1,2400:8500:1301:727:133:130:48:01

代理服务器端口:127.0.0.1:11000

groupadd ssuseruseradd ssuser -g ssuseriptables -t nat -A PREROUTING -d 133.130.48.1/32 -p tcp -m tcp --dport 110 -j DNAT --to-destination 133.130.48.1:11000iptables -t nat -A PREROUTING -d 133.130.48.1/32 -p udp -m udp --dport 110 -j DNAT --to-destination 133.130.48.1:11000iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 11000 -j ACCEPTiptables -A INPUT -p udp -m state --state NEW -m udp --dport 11000 -j ACCEPTiptables -t filter -m owner --gid-owner ssuser -A OUTPUT -d 127.0.0.1,133.130.48.1 -j DROPip6tables -t filter -m owner --gid-owner ssuser -A OUTPUT -d ::1,2400:8500:1301:727:133:130:48:01/64 -j DROP


0 0
原创粉丝点击