Link to home
Start Free TrialLog in
Avatar of chsalvia
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-028stab051.2-ent/modules.dep (No such file or directory)
iptables v1.3.6: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)

ASKER CERTIFIED SOLUTION
Avatar of Gabriel Orozco
Gabriel Orozco
Flag of Mexico image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
> modprobe: Can't open dependencies file /lib/modules/2.6.18-028stab051.2-ent/modules.dep (No such file or directory)
run: depmod -a
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-028stab051.2-ent?

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.