LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-11-2012, 03:57 PM   #1
nouser
LQ Newbie
 
Registered: Feb 2012
Posts: 6

Rep: Reputation: Disabled
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
 
Old 02-12-2012, 03:38 AM   #2
cbtshare
Member
 
Registered: Jul 2009
Posts: 645

Rep: Reputation: 42
mv modprobe.conf modprobe.d/modprobe.con
then rm modprobe.conf
 
Old 02-12-2012, 07:08 AM   #3
nouser
LQ Newbie
 
Registered: Feb 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by cbtshare View Post
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.
 
Old 02-12-2012, 02:16 PM   #4
cbtshare
Member
 
Registered: Jul 2009
Posts: 645

Rep: Reputation: 42
can you please type the command you used ,there was a typo error in my command...
 
Old 02-12-2012, 02:23 PM   #5
nouser
LQ Newbie
 
Registered: Feb 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by cbtshare View Post
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..
 
Old 02-12-2012, 03:19 PM   #6
nouser
LQ Newbie
 
Registered: Feb 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by cbtshare View Post
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)
 
Old 02-13-2012, 09:25 PM   #7
cbtshare
Member
 
Registered: Jul 2009
Posts: 645

Rep: Reputation: 42
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Iptables - 'Nat' Error plynth Linux - Networking 12 08-19-2011 03:49 AM
iptables: can't initialize iptables table `NAT' linuxgentoo Linux - Kernel 3 01-17-2010 10:15 AM
Getting NAT error when trying to set iptables timgerr Linux - Software 7 09-05-2008 02:32 AM
IPTABLES and NAT metallica1973 Linux - Security 7 09-07-2007 09:08 PM
IPTABLES : build NAT using IPTABLES joseph Linux - Networking 4 04-23-2004 05:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration