Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Iptables Forwarding, Ports aren't forwarded to my LAN
Buggy
post Nov 15 2004, 01:27 PM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 5
Joined: 15-November 04
Member No.: 4,175



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..
Go to the top of the page
 
+Quote Post
hughesjr
post Nov 15 2004, 03:03 PM
Post #2


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



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


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post
Buggy
post Nov 15 2004, 03:23 PM
Post #3


Whats this Lie-nix Thing?
*

Group: Members
Posts: 5
Joined: 15-November 04
Member No.: 4,175



Sorry for the password - I had some problems with my httpd.. Try it now.. unsure.gif
Go to the top of the page
 
+Quote Post
Buggy
post Nov 16 2004, 10:39 AM
Post #4


Whats this Lie-nix Thing?
*

Group: Members
Posts: 5
Joined: 15-November 04
Member No.: 4,175



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
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 16th December 2017 - 09:22 PM