Chat with us, powered by LiveChat
How do I install APF firewall into the VPS?

How do I install APF firewall into the VPS?

Post is applied for : Virtuozzo for Linux VPS

The installation of APF requires some additional steps to be taken on the hardware node.

1. First of all, you should define which iptables modules are available for VPSes.

Edit /etc/sysconfig/iptables-config:
————–
IPTABLES_MODULES=”ipt_REJECT ipt_tos ipt_TOS ipt_LOG ip_conntrack ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length ipt_state iptable_nat ip_nat_ftp”
————–

Edit /etc/sysconfig/vz:
————–
IPTABLES=”ipt_REJECT
ipt_tos ipt_TOS ipt_LOG ip_conntrack ipt_limit ipt_multiport
iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length ipt_state iptable_nat ip_nat_ftp”
————–

Restart Virtuozzo. All VPSs will be restarted.
————–
# service vz restart
————–

2. Increase numiptent parameter for the VPS you need to install APF into. This parameter limits the amount of iptables rules available for a VPS. Default APF configuration requires ~200 rules. Let’s set it to 400:
————–
# vzctl set 101 –numiptent 400 –save
————–

3. Install APF inside the VPS. Edit /etc/apf/conf.apf, set the following parameters:
————–
IFACE_IN=”venet0
IFACE_OUT=”venet0
SET_MONOKERN=”1″
————–

4. Start APF inside the VPS:
————–
# /etc/init.d/apf start
————–

This is the normal procedure to install APF on VPS’s. We can configure /etc/apf/conf.apf file as per our requirements.

Gulam

Hi 21 years gulam shaikh working in a webhost company.

Latest posts by Gulam (see all)

Sharing

Leave your comment