From: "David Busby" <busby@pnts.com>
To: Tim <twrodriguez@earthlink.net>,
Netfilter Mailing List <netfilter@lists.netfilter.org>
Subject: Re: DNAT & Host Headers
Date: Mon, 30 Jun 2003 18:40:15 -0700 [thread overview]
Message-ID: <04cf01c33f71$c0910650$1100000a@busbydev> (raw)
In-Reply-To: 002201c33f70$d1e33000$0101a8c0@techinitiatives.com
When using apache the server will look at the HTTP host header which in your
case would be "Host: www.mydomain.com\r\n"
The HTTP headers are contained inside the TCP packet and are not modified by
iptables (in your rules)
So as long as the server can communicate in and out the host name will only
affect the web server
Of course the web server must be configured to look for that host header
name (and alternatives such as mydomain.com) and to listen on the ipaddress
$NEMESIS
HTH
/B
----- Original Message -----
From: "Tim" <twrodriguez@earthlink.net>
To: "Netfilter Mailing List" <netfilter@lists.netfilter.org>
Sent: Monday, June 30, 2003 18:33
Subject: DNAT & Host Headers
First here is the rules within their respective chains:
iptables -t nat -A PREROUTING -p tcp --dport 80 -d $INTERNET -j DNAT
--to $NEMESIS
iptables -A FORWARD -p tcp --dport 80 -d $NEMESIS -j ACCEPT
I'm running this particular web-site with a host header, when I type in
the www.mydomain.com address on the browser and the packets hit the
prerouting chain then the forward chain how will the communication still
know that it is meant for www.mydomain.com
Will this work or do I need to modify the rules in order for my web
server to recognize that the information is intended for
www.mydomain.com. As it is there are several web-sites within my
web-server utilizing the same ip address, including the default
web-site.
Any insight will be gratefully appreciated.
Thanks in advance
Tim--Mia/Fla.
next prev parent reply other threads:[~2003-07-01 1:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-01 1:33 DNAT & Host Headers Tim
2003-07-01 1:40 ` David Busby [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-07-01 1:44 George Vieira
2003-07-01 1:32 tim
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='04cf01c33f71$c0910650$1100000a@busbydev' \
--to=busby@pnts.com \
--cc=netfilter@lists.netfilter.org \
--cc=twrodriguez@earthlink.net \
/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