LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   IPtables won't start (https://www.linuxquestions.org/questions/linux-newbie-8/iptables-wont-start-4175458492/)

havock 04-17-2013 10:33 AM

IPtables won't start
 
I just got a new VPS running Ubuntu 64 bit.

I am trying to start IPtables with the following as the rules:

Code:

iptables --flush
# nat
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o venet0 -j SNAT --to 165.78.171.95
# port forward
iptables -t nat -A PREROUTING -p tcp --dport 6881 -j DNAT --to 10.8.0.6
iptables -A FORWARD -s 10.8.0.6 -p tcp --dport 6881 -j ACCEPT
iptables -t nat -A PREROUTING -p udp --dport 6881 -j DNAT --to 10.8.0.6
iptables -A FORWARD -s 10.8.0.6 -p udp --dport 6881 -j ACCEPT
# to the web gui
iptables -t nat -A PREROUTING -p tcp --dport 41255 -j DNAT --to 10.8.0.6
iptables -A FORWARD -s 10.8.0.6 -p tcp --dport 41255 -j ACCEPT

When I try to start iptables with a sudo ./iptables.sh I get the following error:
iptables v1.4.12: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.4.12: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.4.12: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.4.12: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
I checked an apt-get is reporting I have the newest version of IPTables.
My Kernel version is: 2.6.32-042stab068.8

and I believe the VPS is running on OpenVZ. I've tried the fixes I found in google for this issue on OpenVZ but the commands are not found.

I will be filing a trouble ticket with my VPS provider but I thought I'd check here first before I do that.

Thanks,

Zzipo 04-17-2013 12:38 PM

I cannot help you with this, but I have searched in the Web, and:

https://www.linuxquestions.org/quest...%60nat-672439/ -> As I see some related with the modules in the compiling time. (.config)

http://forums.gentoo.org/viewtopic-t...ff2b89c00ea89a

Check messages in /var/log/dmesg -> maybe wrong format?


All times are GMT -5. The time now is 10:24 PM.