LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   iptables nat error (https://www.linuxquestions.org/questions/linux-networking-3/iptables-nat-error-928863/)

nouser 02-11-2012 03:57 PM

iptables nat error
 
hi..i try this iptables -t nat -A POSTROUTING -j SNAT --to-source XXXXXXXXX (xxx my vps ip) and i get this error:
WARNING: Deprecated config file /etc/modprobe.conf, all config files belong into /etc/modprobe.d/.
FATAL: Module ip_tables not found.
iptables v1.4.10: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.


its a vps(openvz) that i rent..
uname -r:
Quote:

2.6.18-274.el5.028stab093.2

cbtshare 02-12-2012 03:38 AM

mv modprobe.conf modprobe.d/modprobe.con
then rm modprobe.conf

nouser 02-12-2012 07:08 AM

Quote:

Originally Posted by cbtshare (Post 4600326)
mv modprobe.conf modprobe.d/modprobe.con
then rm modprobe.conf

hi thanks for your answer.it seems here that people prefer to laugh at other's and not try to help..billion of views in many topics and 0 answers..anyway i really thank you for your help! now i dont get the error of "missing" that file..but i continue getting this error:
FATAL: Module ip_tables not found.
iptables v1.4.10: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.

cbtshare 02-12-2012 02:16 PM

can you please type the command you used ,there was a typo error in my command...

nouser 02-12-2012 02:23 PM

Quote:

Originally Posted by cbtshare (Post 4600719)
can you please type the command you used ,there was a typo error in my command...

iptables -t nat -A POSTROUTING -j SNAT --to-source 111.111.111.111

where 111.111.111.111 i enter my vps ip.. thank you very much!
PS that command didnt really work because --to--source didnt worked and i then used:

iptables -t nat -A POSTROUTING -j SNAT --source 111.111.111.111

but still same problem with 'nat' table..

nouser 02-12-2012 03:19 PM

Quote:

Originally Posted by cbtshare (Post 4600719)
can you please type the command you used ,there was a typo error in my command...

oups i just saw what you said..yes there was a mistake but i fixed it..
you gave me:
mv modprobe.conf modprobe.d/modprobe.con

but i did it:
mv modprobe.conf modprobe.d/modprobe.conf

(i first went to cd /etc)

cbtshare 02-13-2012 09:25 PM

I'd suggest first try to update your system with yum or yours distros update tool.It will install and update iptables and the kernel if needed.

If that doesnt work then try this link..

http://forums.gentoo.org/viewtopic-t...oosources.html


All times are GMT -5. The time now is 02:29 AM.