If you receive the following error on restating iptables on a VPS:
error message: from firewall software ~ iptables: Unknown error 4294967295
you need to make sure the required iptable modules are loaded in the host server kernel. You have to use modprobe to load the following modules in the kernel:
modprobe ipt_MASQUERADE
modprobe ipt_helper
modprobe ipt_REDIRECT
modprobe ipt_state
modprobe ipt_TCPMSS
modprobe ipt_LOG
modprobe ipt_TOS
modprobe tun
modprobe iptable_nat
modprobe ipt_length
modprobe ipt_tcpmss
modprobe iptable_mangle
modprobe ipt_limit
modprobe ipt_tos
modprobe iptable_filter
modprobe ipt_helper
modprobe ipt_tos
modprobe ipt_ttl
modprobe ipt_REJECT
Once the modules are loaded, add the modules to your VPS using the vzctl command. You will have to stop the VPS first
vzctl stop VEID
and then add the modules to a VPS
vzctl set VEID –iptables ipt_REJECT –iptables ipt_tos –iptables ipt_TOS –iptables ipt_LOG –iptables ip_conntrack –iptables ipt_limit –iptables ipt_multiport –iptables iptable_filter –iptables iptable_mangle –iptables ipt_TCPMSS –iptables ipt_tcpmss –iptables ipt_ttl –iptables ipt_length –iptables ipt_state –iptables iptable_nat –iptables ip_nat_ftp –save
Once the above command is executed, start the VPS
vzctl start VEID
Now you are set to use iptables on your VPS.
June 29th, 2011 at 11:30 am
hello all. nice help, but i have problem i try but no result. when i enter lsmod in my VPS it shows nothing. modprobe does not find modules. can you give me some solution?
July 6th, 2011 at 9:43 am
lsmod, modprobe won’t work inside of your VPS. You need to enable the iptables module on your VPS from the main server your VPS is hosted on. You will have to contact your hosting provider, only they can do it.
October 19th, 2011 at 11:02 pm
Good Article. Greate Post .. keep it up