Appendix A: Additional Firewall Configuration on Linux Web Servers
Perform the following actions for the required Linux-based web server:
-
If this Linux-based web server is a VPS, make sure the ipt_owner iptables module is loaded on the corresponding VPS hardware node on boot:
- Log on to the VPS hardware node as root.
-
Execute the following commands:
echo "modprobe ipt_owner" >> /etc/rc.modules
chmod +x /etc/rc.modules
/etc/rc.modules
- Log on to the Linux-based web server as root.
-
On the Linux-based web server, execute the following commands:
iptables -I OUTPUT 1 -p tcp --syn --dport 8352 -m owner ! --uid-owner root -j REJECT
iptables -I OUTPUT 2 -p tcp --syn --dport 8354 -m owner ! --uid-owner root -j REJECT
iptables -I OUTPUT 3 -p tcp --syn --dport 8355:8500 -j REJECT
service iptables save