Mike Ballon wrote:
Thanks in advance....

So yet again something that I liked and knew quite well changed, I can't
port forward with the 2.4 kernel is save my life.  I like my old fw script
it works great (minus forwarding now) so I disabled the ipchains and
iptables init script after spending three hours pulling my hair out and use
my old script as of now.  All I want is simple port forwarding like I had
with ipmasqadm, help me out.

I want the following rule (I'll do the rest) ported to whatever the heck
works now if someone has a spare minute or two.  I'm running the stock RH
7.3 2.4.18-3 kernel.

$IPCHAINS -A input -i $ExtIF -p tcp -s 0/0 -d $ExtHostIP 25 -j ACCEPT
ipmasqadm portfw -a -P tcp -L $ExtHostIP 25 -R 192.168.0.5 25

Thanks oh here's the var's in case you want them, it's pretty much the same
as the one I demo'd at one of the luau mettings way back.

# Setup global variables here
IPCHAINS="/sbin/ipchains"

# Setup Internal LAN variables here
IntIF="eth1"
IntHostIP=`ifconfig eth1 | grep inet | awk -F: '{ print $2}' |awk -F" "
'{print $1}'`

# Setup External Internet variables here
ExtIF="eth0"
ExtHostIP=`ifconfig eth0 | grep inet | awk -F: '{ print $2}' |awk -F" "
'{print $1}'`

Unfortunately, 2.4 can't use ipmasqadm, and ipchains can't do port forwards on it's own, so you'll have to use iptables for this. Of course this means converting whatever rulesets you might have (which may be a problem).

However, iptables is pretty flexible.  To forward a port:
iptables -t nat -A PREROUTING -p tcp -s $ExtHostIP --dport 25 --to 192.168.0.5:25

Make sure you allow it on the forward table.

--MonMotha

Reply via email to