Estou tentando aplicar o seguinte:
/sbin/iptables -t nat -I PREROUTING --src 0/0 --dst [MY IP] -p tcp --dport 40 -j REDIRECT --to-ports 80
No entanto, recebo o seguinte erro:
iptables v1.3.5: can't initialize iptables table '/sbin/nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
Estou executando o CentOS 5.5. Alguém pode por favor avisar?
UPDATE
ifconfig
output:
eth0 Link encap:Ethernet HWaddr 00:18:51:A4:3E:E0
inet addr:x.x.x.x Bcast:173.201.16.255 Mask:255.255.255.0
inet6 addr: fe80::218:51ff:fea4:3ee0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:29678326 errors:0 dropped:0 overruns:0 frame:0
TX packets:13545931 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2604591444 (2.4 GiB) TX bytes:6052013635 (5.6 GiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:34139502 errors:0 dropped:0 overruns:0 frame:0
TX packets:34139502 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5160432652 (4.8 GiB) TX bytes:5160432652 (4.8 GiB)
lo:1 Link encap:Local Loopback
inet addr:97.74.207.156 Mask:255.255.255.255
UP LOOPBACK RUNNING MTU:16436 Metric:1
lo:2 Link encap:Local Loopback
inet addr:173.201.181.56 Mask:255.255.255.255
UP LOOPBACK RUNNING MTU:16436 Metric:1
uname -a
output:
Linux ip-173-201-16-45.ip.secureserver.net 2.6.18-028stab070.14 #1 SMP Thu Nov 18 16:04:02 MSK 2010 i686 i686 i386 GNU/Linux
UPDATE 2
grep -v \# /etc/sysconfig/iptables-config
output:
IPTABLES_MODULES=""
IPTABLES_MODULES_UNLOAD="yes"
IPTABLES_SAVE_ON_STOP="no"
IPTABLES_SAVE_ON_RESTART="no"
IPTABLES_SAVE_COUNTER="no"
IPTABLES_STATUS_NUMERIC="yes"
IPTABLES_STATUS_VERBOSE="no"
UPDATE 3
sudo /sbin/iptables -L
output:
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
sudo /sbin/lsmod | egrep -i iptables
output: BLANK.
sudo /sbin/lsmod | egrep -i nat
output: BLANK.
UPDATE 4
uname -a
de saídas:
Linux ip-173-201-16-45.ip.secureserver.net 2.6.18-028stab070.14 #1 SMP Thu Nov 18 16:04:02 MSK 2010 i686 i686 i386 GNU/Linux