Help - Search - Members - Calendar
Full Version: Iptables Forwarding
Linuxhelp > Support > Technical Support
Buggy
I have a bit of a problem setting my iptables that net forwarding would work! I am using two scripts but none of them is working properly.. sad.gif

I'm using RedHat 9 witch is updated every day so I am up2date with my software.. What i dont know is if i have a pacage missing that forwarding would work! Oh, i DO have iptables.rpm smile.gif So this is it..:

The script I'm using is ..:: HERE ::..
The script I was using is located ..:: HERE ::..

In both cases the port was NOT forwarded to my PC that has an IP 192.168.0.150 with a subnet mask 255.255.255.0.. As you can see i was testih various things but none of them really worked huh.gif .. If someone would be so kind to help me the ports i need to be forwarded are 9670 and a portrange 8525-8535 to 192.168.0.150..

If u have a better script that is supposed to work let me know (both of these scripts is supposed to work blink.gif )

Please help..
hughesjr
I can't see the scripts that you linked, it asks for a username and password ... however, I recomnmend this script. There are examples of port forwarding to the firewall box ... and to machines behind the firewall box....here is an example forward to a machine inside (tcp in from outside ports 6890 and 6891 to a machine (192.168.0.4) on the internal network) using the above script:


CODE
$IPTABLES -A FORWARD -i $EXTIF -o $INTIF -p tcp --dport 6890:6891 -m state  --state NEW,ESTABLISHED,RELATED -j ACCEPT

$IPTABLES -A PREROUTING -t nat -p tcp -d $EXTIP --dport 6890 -j DNAT --to 192.168.0.4:6890
$IPTABLES -A PREROUTING -t nat -p tcp -d $EXTIP --dport 6891 -j DNAT --to 192.168.0.4:6891
Buggy
Sorry for the password - I had some problems with my httpd.. Try it now.. unsure.gif
Buggy
I tryed your script and I'm in the phase of configuring it.. I just have 2 questions:

CODE
# Assign the internal TCP/IP network and IP address
INTNET="192.168.1.0/24"
INTIP="192.168.1.1/24"
echo "  Internal Network: $INTNET"
echo "  Internal IP:      $INTIP"
echo "  ---"




# Setting a few other local variables
#
UNIVERSE="0.0.0.0/0"


What is this? Is Internal IP the IP of the computer that runs the iptables (server in my case), but then what is Internal network?
And what is UNIVERSE? Please write as soon as possible..

Oh, and I almost forgot: what is the difference between iptables and ipchains? huh.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.