1827284 Members
3295 Online
109717 Solutions
New Discussion

port forwarding

 
SOLVED
Go to solution
Cristian M.
Occasional Advisor

port forwarding

Anyone knows or have some examples how to make port forwarding on Linux RedHat 7.3 using ipchains?
I've tried something like that:
"iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 21 -j DNAT --to 192.68.10.11" but i got an error:
"iptables v1.2.5: can't initialize iptables table `nat': iptables who? (do you need to insmod?)"
time solve it all
3 REPLIES 3
Jerome Henry
Honored Contributor
Solution

Re: port forwarding

Do you use ipchains or iptables ? On rh7.3, iptables by default. Ipchains is the older version.
Your message shows that you use iptables, which is normal.
Your error message means that nat table is not known. Your should write NAT instead.
Check also that there is no conflict between Ipchains and Iptables :
service ipchains stop
chkconfig ipchains off
rmmod ipchains

service iptables start
chkconfig iptables on
insmod iptables.
HTH
J
You can lean only on what resists you...
Cristian M.
Occasional Advisor

Re: port forwarding

Well, i'm using ipchains. I thought i can use both ipchains and iptables at the same time. I didn't find any possibilities to make 'port forwarding' using ipchains so i guess i have to use iptables from now on...
time solve it all
Jerome Henry
Honored Contributor

Re: port forwarding

Yes you will... Ipchains is not supported anymore in the further releases...
You may be used to Ipchains, but you'll see that Iptables is better, and quite easy to use.
Read this paper on that :
www.linuxguruz.org/iptables/ howto/iptables-HOWTO-7.html
RGDS
J
You can lean only on what resists you...