hi all,


I have a FW connected to 10.0.0.0 network and
156.15.77.0 network.

FW ext:ip 156.15.77.77
int ip:10.0.0.199

I need to block all traffic.

I need to port forward any ssh traffic from outside to 10.0.0.154

 I also need to ssh from 10.0.0.154 to 10.0.0.199 (which is the internal
ip of FW)

So i have a script ::

It does the port forw correctly

but i cannot do the ssh from 10.0.0.154 to  10.0.0.199


**** Can you help me out !!: ******



My script:

!/bin/bash

IPCHAINS="/sbin/ipchains"
IPMASQADM="/usr/sbin/ipmasqadm"

#Clear all previous stuff
$IPCHAINS -F input
$IPCHAINS -F output
$IPCHAINS -F forward

#Deny everything by default
$IPCHAINS -P input DENY
$IPCHAINS -P output DENY

#Do the change ip-addr in the header while forwarding
$IPCHAINS -P forward DENY

#Allow ssh in and out
$IPCHAINS -A input -i eth0 -p tcp --dport 22 -j ACCEPT
$IPCHAINS -A output -i eth0 -p tcp --sport 22 -j ACCEPT
$IPCHAINS -A input -i eth1 -p tcp --dport 22 -j ACCEPT
$IPCHAINS -A output -i eth1 -p tcp --sport 22 -j ACCEPT

#Clear the prev stuff
$IPMASQADM portfw -f
$IPMASQADM portfw -a -P tcp -L 156.15.77.77 22 -R 10.0.0.154 22

#enable ip forwarding
echo "1" > /proc/sys/net/ipv4/ip_forward



THANKS A LOT
Ashley



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to