Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2003
    Milwaukee, WI

    Iptables Forwarding Problem (Redhat 9)

    Hey, Good Linux Folks.

    Here's what I've tried:
    /sbin/iptables -t nat -A PREROUTING -p tcp -d --dport 11343 -j DNAT --to

    /sbin/iptables -t nat -A POSTROUTING -p tcp -s --sport 80 -j SNAT --to

    I saved those rules, re-started the iptables service, re-booted the Redhat 9 box, verified that only those two were the rules in effect, and pointed IE at No go.

    Then, I tried the following two rules:
    /sbin/iptables -t nat -A PREROUTING -p tcp -i eth0 -d --dport 11343 -j DNAT --to

    /sbin/iptables -A FORWARD -p tcp -i eth0 -d --dport 80 -j ACCEPT


    But a lot of people are having success with rules like the above, otherwise such examples wouldn't be all over the Internet. So what piece of the puzzle am I missing?!?

    Yes, I did echo "1" > /proc/sys/net/ipv4/ip_forward. In fact, that's the first thing I did. No, the ipchains module is not installed.

    Although I'm a newbie to Linux, I've been a professional software developer for 25 years (mostly Microsoft Windows stuff, for the last 15 years). And what this smells like to me is that I'm missing some little Linux insight that all the iptables examples assume I already have.

    Here's hoping somebody out there can say something like "Duh, Vic: power up the Linux box first; then your iptables scripts will work." Well, you know what I mean...

    Thanks in advance.


  2. #2
    Linux Newbie
    Join Date
    Apr 2003
    UK, Manchester
    Ignore what I originally posted. I was thinking of something else.

    btw - Where is the delete post option ?

  3. #3
    Linux Guru
    Join Date
    Oct 2001
    Täby, Sweden
    Am I correct in the following?
    You're running a HTTP server on
    You're running a router on, and that is the computer on which you are applying these rules.
    I'm suspecting what your problem is (I went through the exact same thing), but I'm not sure. Could you give me a bit more info? What's your network setup (included where your internet is connected to), and what computer (IP address and routing info) are you trying to access the server from?

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts