chsalvia
asked on
Port redirect using iptables
I'm trying to redirect port 80 to port 8080 using iptables. I'm running Debian 4.
So, I type:
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
But I get the following error:
modprobe: Can't open dependencies file /lib/modules/2.6.18-028sta b051.2-ent /modules.d ep (No such file or directory)
iptables v1.3.6: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
So, I type:
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
But I get the following error:
modprobe: Can't open dependencies file /lib/modules/2.6.18-028sta
iptables v1.3.6: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ok.. I mean after running depmod -a, check you have the other modules loaded. if you can't, then you need to install the kernel package with all modules.
Could you show us the ls output in /lib/modules? and /lib/modules/2.6.18-028sta b051.2-ent ?
I have the feeling that they are missing.
I have the feeling that they are missing.
Hi
Everyone of us see the same but with different words.
Any luck looking at our propositions?
G.
Everyone of us see the same but with different words.
Any luck looking at our propositions?
G.
Thanks
run: depmod -a