I have a machine on my internal network running a server on a port, I want to be able to connect to that port remotely through my gateway box (Running RedHat 6)
The internal machine can get out to the net without any troubles (IP Masquerading is set up on the gateway machine)
What I have been told so far:
you might just want to firewall mark it and use ipfwadm to forward the marked packet
using these commands to mark the packets:
EXTERNALIP="`ifconfig ppp0 | grep inet | cut -b 21-34`"
ipchains -A input -p tcp -s 0/0 -d $EXTERNALIP -m 5901
How do I forward the marked packets?
or is there a better way to do this?
|