Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 07 Sep 2000 01:34:20 GMT
From:      "Terje Oseberg" <oseberg@hotmail.com>
To:        matt@gsicomp.on.ca
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: FreeBSD 4.0 Firewall System and Problem with Apache Name Virtual Hosts
Message-ID:  <F149BrY3VaI0oZIi7T500004f2c@hotmail.com>

next in thread | raw e-mail | index | archive | help

> > If I'm on the system under test and I telnet to localhost port 80
> > and do the GET requests, it doesn't work, but when I telnet to port
> > 80 from another computer, it does work. This is on FreeBSD 3.2 that
> > I noticed this and with this particular config file and the original
> > config file that I had on that system.
> >
> > I'm thinking that when I telnet to localhost, it telnet's to the
> > wrong (internal rather than external) IP adress. And maybe the bug
> > in FreeBSD 4.0 is that when you telnet from outside the firewall
> > to port 80, it actually believes that you're inside the firewall.
>
>If you telnet to port 80 on the local system, the request is coming from
>inside the firewall.  Hence, it's going to use the web servers NAT'd 
>address
>or 127.0.0.1.  Requests from other systems on the NAT'd network will 
>connect
>to the NAT'd address of the web server.  The only time when the external
>address will be used is when the requests come from outside the
>NAT/firewall.
>
>--
>Matthew Emmerton
>GSI Computer Services
>+1 (800) 217-5409 (Canada)

Hey, sorry about that, I should've thought of that.
But, I solved my Apache and FreeBSD 4.0 problem by adding the
following lines to the end of my httpd.conf file.

So, at this point, I believe that my theory was correct even
though I made an obvious error in my reasoning above.

Here's what I added.
#############################################################
NameVirtualHost 192.168.1.1

<VirtualHost 192.168.1.1>
</VirtualHost>

<VirtualHost 192.168.1.1>
  ServerName www.etiam.net
  DocumentRoot /data/web/www.etiam.net
</VirtualHost>

<VirtualHost 192.168.1.1>
  ServerName www.alluent.com
  DocumentRoot /data/web/www.alluent.com
</VirtualHost>

<VirtualHost 192.168.1.1>
  ServerName www.fineworks.com
  DocumentRoot /data/web/www.fineworks.com
</VirtualHost>

<VirtualHost 192.168.1.1>
  ServerName www.globalgastrohospital.com
  DocumentRoot /data/web/www.globalgastrohospital.com
</VirtualHost>

########################################################

I also had to add a line to my /etc/hosts file.
My hosts file now contains:

216.15.83.94    alpha.etiam.net alpha etiam.net
192.168.1.1     me.etiam.net

(Without the me.etiam.net thing Apache was trying to do a reverse
DNS on 192.168.1.1 or something that was making it take forever to
start up)

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F149BrY3VaI0oZIi7T500004f2c>