From: Ray Olszewski <ray@comarre.com>
To: linux-newbie@vger.kernel.org
Subject: RE: How to forward port 80 on Linux Redhat 9?
Date: Wed, 28 Jul 2004 22:56:21 -0700 [thread overview]
Message-ID: <5.1.0.14.1.20040728224121.01fecee8@celine> (raw)
In-Reply-To: <GNEPLLCIIBHICCOGIAKPCEMBDBAA.eatley@wowcorp.com>
At 01:48 PM 7/28/2004 -0400, Eve Atley wrote:
>Ray, thanks for the assistance. Some questions...
>
> >iptables -t nat -A PREROUTING -p tcp --destination 209.158.555.123 \
> --destination-port 80 -j DNAT --to-destination 192.168.10.28
>
>I'll implement this. I'm not aware of how to make it 'stick'; doesn't this
>change after I reboot Redhat? Does this require a save?
I don't know what you mean by "a save". This is not standard Unix/Linux
jargon. But yes, a change you make from the command line will not survive a
reboot.
Since I don't know how you are installing your existing firewall ruleset, I
cannot tell you *exactly* how to "make it 'stick'". As a general matter,
you put the command in some script that runs as part of the boot/init process.
Just as an example, on our router here (running Debian/Woody), all the
commands to create (or recreate) the firewall ruleset are in a file
/etc/network/fwrules . It begins by clearing all the chains, then adds
rules in the proper order to get them to work. We then added to the init
script /etc/init.d/networking a line that runs the fwrules script whenever
the networking script is run with the "start" or "restart" option.
If you are using some existing firewall package (for example, Shorewall) to
create your basic firewall, you should consult that package's documentation
to see how it wants you to add custom, site-specific rules.
> >You also need a rule in the default table that ACCEPTs incoming port-80
> >traffic. Our actual ruleset here is sufficiently nonstandard that it will
>
>And where might this default table be, so I can edit it?
The table is in the kernel, like all the tables. You "edit it" with
iptables commands, just like the change you make to the nat table.
You want to find the script that creates it during boot/init, and I have no
way of knowing where on your system a particular script is located ... not
only am I unfamiliar with REd Hat at that level of detail, but Linux in
general has an assortment of drop-in firewall packages, and I cannot know
what you are using.
> >One moe clarification: iptables rules function as a set, not in isolation.
>
>So does this mean I must make a particular IP table for this case?
>iptables -L gives me a whole lot of info, for which I see nothing specific
>to port 80. I'll send the iptables listing if needed.
No, it does not mean that. It means that you need to look at the entire
ruleset for the default chain (the one that "iptables -nL", or, better,
"iptables -nvL", lists) to make sure the rule you add is in the proper
place. Similarly, you need to check the rules that precede the one you add
to the nat table (PREROUTING chain) to make sure that that rule will have
an actual effect.
If you cannot do these things yourself, the only option is to show them to
someone who can interpret them. If you do so, please use the more complete
form I specified above ("iptables -nvL") and the corresponding one for the
nat table (I think "iptables -t nat -nvL", but I may have that slightly wrong).
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
next prev parent reply other threads:[~2004-07-29 5:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-28 15:58 How to forward port 80 on Linux Redhat 9? Eve Atley
2004-07-28 16:47 ` Ray Olszewski
2004-07-28 17:48 ` Eve Atley
2004-07-29 5:56 ` Ray Olszewski [this message]
2004-07-29 12:44 ` Eve Atley
2004-07-29 21:39 ` chuck gelm
2004-07-28 19:18 ` pa3gcu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5.1.0.14.1.20040728224121.01fecee8@celine \
--to=ray@comarre.com \
--cc=linux-newbie@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox