{"id":56,"date":"2009-09-21T18:10:05","date_gmt":"2009-09-21T22:10:05","guid":{"rendered":"http:\/\/linuxhostingsupport.net\/blog\/?p=56"},"modified":"2013-03-20T08:39:38","modified_gmt":"2013-03-20T12:39:38","slug":"howto-add-iptable-modules-on-a-vps","status":"publish","type":"post","link":"https:\/\/linuxhostingsupport.net\/blog\/howto-add-iptable-modules-on-a-vps","title":{"rendered":"HowTo: Add iptable modules on a VPS"},"content":{"rendered":"<p>If you receive the following error on restating iptables on a VPS:<\/p>\n<blockquote><p><strong>error message: from firewall software ~ iptables: Unknown error 4294967295<\/strong><\/p><\/blockquote>\n<p>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:<\/p>\n<p><strong>modprobe ipt_MASQUERADE<br \/>\nmodprobe ipt_helper<br \/>\nmodprobe ipt_REDIRECT<br \/>\nmodprobe ipt_state<br \/>\nmodprobe ipt_TCPMSS<br \/>\nmodprobe ipt_LOG<br \/>\nmodprobe ipt_TOS<br \/>\nmodprobe tun<br \/>\nmodprobe iptable_nat<br \/>\nmodprobe ipt_length<br \/>\nmodprobe ipt_tcpmss<br \/>\nmodprobe iptable_mangle<br \/>\nmodprobe ipt_limit<br \/>\nmodprobe ipt_tos<br \/>\nmodprobe iptable_filter<br \/>\nmodprobe ipt_helper<br \/>\nmodprobe ipt_tos<br \/>\nmodprobe ipt_ttl<br \/>\nmodprobe ipt_REJECT<\/strong><\/p>\n<p>Once the modules are loaded, add the modules to your VPS using the vzctl command. You will have to stop the VPS first <\/p>\n<p><strong>vzctl stop VEID<\/strong><\/p>\n<p>and then add the modules to a VPS<\/p>\n<p><strong>vzctl set VEID &#8211;iptables ipt_REJECT &#8211;iptables ipt_tos &#8211;iptables ipt_TOS &#8211;iptables ipt_LOG &#8211;iptables ip_conntrack &#8211;iptables ipt_limit &#8211;iptables ipt_multiport &#8211;iptables iptable_filter &#8211;iptables iptable_mangle &#8211;iptables ipt_TCPMSS &#8211;iptables ipt_tcpmss &#8211;iptables ipt_ttl &#8211;iptables ipt_length   &#8211;iptables ipt_state &#8211;iptables iptable_nat &#8211;iptables ip_nat_ftp &#8211;save<\/strong><\/p>\n<p>Once the above command is executed, start the VPS<\/p>\n<p><strong>vzctl start VEID<\/strong><\/p>\n<p>Now you are set to use iptables on your VPS.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you receive the following error on restating iptables on a VPS:<br \/>\nerror message: from firewall software ~ iptables: Unknown error 4294967295<br \/>\nyou 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:<br \/>\nmodprobe ipt_MASQUERADE<br \/>\nmodprobe ipt_helper<br \/>\nmodprobe ipt_REDIRECT<br \/>\nmodprobe ipt_state<br \/>\nmodprobe ipt_TCPMSS<br \/>\nmodprobe ipt_LOG<br \/>\nmodprobe ipt_TOS<br \/>\nmodprobe tun<br \/>\nmodprobe iptable_nat<br \/>\nmodprobe ipt_length<br \/>\nmodprobe ipt_tcpmss<br \/>\nmodprobe iptable_mangle<br \/>\nmodprobe ipt_limit<br \/>\nmodprobe ipt_tos<br \/>\nmodprobe iptable_filter<br \/>\nmodprobe ipt_helper<br \/>\nmodprobe ipt_tos<br \/>\nmodprobe ipt_ttl<br \/>\nmodprobe ipt_REJECT<br \/>\nOnce the modules are loaded, add the modules to your VPS using the vzctl command. You will have to stop the [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[72,69,70,71],"_links":{"self":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/56"}],"collection":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/comments?post=56"}],"version-history":[{"count":2,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/56\/revisions"}],"predecessor-version":[{"id":2110,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/56\/revisions\/2110"}],"wp:attachment":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/media?parent=56"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/categories?post=56"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/tags?post=56"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}