LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-06-2009, 05:16 AM   #1
slack---line
Member
 
Registered: Jul 2003
Location: Sheffield, UK
Distribution: Gentoo/Slackware10.0@AthlonXP2600, 1Gb RAM; Slackware9.1@Dell Latitude X300; Gentoo@Ultra10
Posts: 48

Rep: Reputation: 15
Apache DNS not recognised - config help requested


Hi,

Just finishing off setting up a server, and am having trouble getting Apache to recognise the domain name I've been assigned (statsmail.trehtcancer.nhs.uk).

Initially I was getting the following errors in the logs...

Code:
[Tue Oct 06 08:26:38 2009] [notice] SIGUSR1 received.  Doing graceful restart
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for
ServerName
So I added 'ServerName statsmail.trentcancer.nhs.uk' to /etc/apache2/httpd.conf and also /etc/apache2/apache2.conf, and restarted the server and the error message has gone...

Code:
[Tue Oct 06 08:26:38 2009] [notice] SIGUSR1 received.  Doing graceful restart
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for
ServerName
[Tue Oct 06 08:26:38 2009] [notice] Apache/2.2.11 (Ubuntu) configured -- resuming normal operations
[Tue Oct 06 09:27:55 2009] [notice] caught SIGTERM, shutting down
[Tue Oct 06 09:27:55 2009] [notice] Apache/2.2.11 (Ubuntu) configured -- resuming normal operations
[Tue Oct 06 10:06:02 2009] [notice] caught SIGTERM, shutting down
[Tue Oct 06 10:06:03 2009] [notice] Apache/2.2.11 (Ubuntu) configured -- resuming normal operations
But connections just time out now when I point the browser at the address, despite the fact I can see it on localhost *i.e. 127.0.1.1).

I think I'm missing something in the configuration though because it Apache doesn't appear to be listening on the Foreign Address as netstat shows...

Code:
root@miles:/etc/apache2# netstat  netstat -a -tcp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 *:www                   *:*                     LISTEN      3368/apache2   
tcp        0      0 localhost:ipp           *:*                     LISTEN      3556/cupsd     
tcp        0      0 *:smtp                  *:*                     LISTEN      29230/master   
tcp        0      1 miles.local:45380       statsmail.trentcanc:www SYN_SENT    28248/firefox   
tcp6       0      0 [::]:smtp               [::]:*                  LISTEN      2160/sshd
Any pointers on where I might have gone wrong would be appreciated (can post config files if required). Feels like I'm so close, but not quite there!

Cheers

slack
 
Old 10-06-2009, 06:29 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
tcp 0 0 *:www *:* LISTEN 3368/apache2
apache listens on all the available interfaces as it's shown by the "*" in the netstat output. I guess you have to add an entry in /etc/hosts like this:
Code:
x.x.x.x statsmail.trehtcancer.nhs.uk
where x.x.x.x is your ip.
 
Old 10-06-2009, 08:04 AM   #3
slack---line
Member
 
Registered: Jul 2003
Location: Sheffield, UK
Distribution: Gentoo/Slackware10.0@AthlonXP2600, 1Gb RAM; Slackware9.1@Dell Latitude X300; Gentoo@Ultra10
Posts: 48

Original Poster
Rep: Reputation: 15
Forgot to add that I'd seen that mentioned in another thread in these forums and have the following already in there...

Code:
10.211.48.240   statsmail.trentcancer.nhs.uk
Restarted apache and still no dice.

There's no firewall in place on the local machine either...

Code:
root@miles:/etc/apache2# iptables -L -v
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
But this computer has been placed in a DMZ, and strangely the IP address that ifconfig reports is not the same as that which www.whatismyipaddress.com reports and I've been told the computer is configured as (purposefully omitted loopback btw)...

Code:
root@miles:/etc/apache2# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:14:22:b0:9e:c7 
          inet addr:192.168.2.22  Bcast:192.168.7.255  Mask:255.255.248.0
          inet6 addr: fe80::214:22ff:feb0:9ec7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1500493 errors:0 dropped:0 overruns:0 frame:0
          TX packets:93528 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:284352007 (284.3 MB)  TX bytes:9113800 (9.1 MB)

I've been told the computers been setup with DNS as statsmail.trentcancer.nhs.uk and nslookup reports a different IP associated with this address (its reporting the same as www.whatismyipaddress.com)

Code:
root@miles:/etc/apache2# nslookup statsmail.trentcancer.nhs.uk
Server:      194.72.7.142
Address:   194.72.7.142#53

Non-authoritative answer:
Name:   statsmail.trentcancer.nhs.uk
Address: 10.211.48.240

The DNS administrator here at the place I work has told me that port 80 isn't blocked at all (nor is 25), although given he doesn't appear to have read 80% of each of the emails I've sent him I get the impression he's not too up to speed on what I'm trying to do or how to set it up properly at his end.
 
Old 10-06-2009, 08:23 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
So the ip of the box is 192.168.2.22. Can you access http://192.168.2.22 from the same box running apache?
If you can, I guess it's a problem with ip_forwarding from 10.211.48.240 --> 192.168.2.22 assuming that there is no firewall in between.
 
Old 10-06-2009, 08:34 AM   #5
slack---line
Member
 
Registered: Jul 2003
Location: Sheffield, UK
Distribution: Gentoo/Slackware10.0@AthlonXP2600, 1Gb RAM; Slackware9.1@Dell Latitude X300; Gentoo@Ultra10
Posts: 48

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by bathory View Post
So the ip of the box is 192.168.2.22. Can you access http://192.168.2.22 from the same box running apache?
If you can, I guess it's a problem with ip_forwarding from 10.211.48.240 --> 192.168.2.22 assuming that there is no firewall in between.

Ah ha, I think you're onto something bathroy.

I can indeed access http://192.168.2.22/ on the machine itself.

How do I go about getting the forwarding set up?

Would it be an entry in /etc/hosts that maps one to another? (My suspicion is its not since /etc/hosts is traditionally for mapping names to IP address', no?)

Is forwarding of one IP's address's to another an aspect of the DMZ? Since the 10.211.48.240 is what this appears to the outside world, whilst within teh DMZ the server thinks its 192.168.2.22?
 
Old 10-06-2009, 08:42 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
If everything is setup correctly in your router, you can access your server from outside your 192.168.2 network using its public ip 10.211.48.240. Try it from a computer in dmz and see what you get.
 
Old 10-06-2009, 09:02 AM   #7
slack---line
Member
 
Registered: Jul 2003
Location: Sheffield, UK
Distribution: Gentoo/Slackware10.0@AthlonXP2600, 1Gb RAM; Slackware9.1@Dell Latitude X300; Gentoo@Ultra10
Posts: 48

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by bathory View Post
If everything is setup correctly in your router, you can access your server from outside your 192.168.2 network using its public ip 10.211.48.240. Try it from a computer in dmz and see what you get.
I'm not sure I have access to a computer on the DMZ, that itself is separate from the rest of the network here (IT are based in another building in the city).

I've contacted the guy who registered the DNS though and have asked (well basically told him, as the impression I get is that he knows less than I do, being cynical, but probably a M$-Windoze flunky) that the forwarding of requests to 10.211.48.240 isn't making it to 192.168.2.22 within the DMZ, because everything works on the server itself but not when the FQDN is used.
 
Old 10-06-2009, 09:18 AM   #8
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
If you don't need your server to be accessible outside from your network, then ask the dns guy to change the ip in the dns to 192.168.2.22 and change the entry in your /etc/hosts accordingly.

Regards
 
Old 10-06-2009, 09:44 AM   #9
slack---line
Member
 
Registered: Jul 2003
Location: Sheffield, UK
Distribution: Gentoo/Slackware10.0@AthlonXP2600, 1Gb RAM; Slackware9.1@Dell Latitude X300; Gentoo@Ultra10
Posts: 48

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by bathory View Post
If you don't need your server to be accessible outside from your network, then ask the dns guy to change the ip in the dns to 192.168.2.22 and change the entry in your /etc/hosts accordingly.

Regards
I don't think I can do that as I can't telnet to 192.168.2.22 (or 10.211.48.240 for that matter) from my computer here at work (nor ping either address) and my understanding is that the DMZ is isolated from the rest of the network.

I'll see what the IT/DNS guy comes back with, cheers for your help so far (got to head home and take my sick cat to the vets now though).

slack

Last edited by slack---line; 10-06-2009 at 09:47 AM.
 
Old 10-06-2009, 10:44 AM   #10
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
FYI, 192.168.2.22 would NEVER be accessible to the outside world as this is an RFC 1918 private/reserved IP address. It may not be routed. If you are using a NAT-DMZ (Network Address Translation DMZ) they will need to forward requests for 10.211.48.240 to 192.168.2.22. Alternatively, they can place you on another subnet with direct internet access and the machine may be reconfigured as 10.211.48.240. (If you choose the latter route, I do suggest setting up a firewall at that time unless they will continue to keep you behind the corporate firewall.)
 
Old 10-06-2009, 11:15 PM   #11
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,356

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
See http://en.wikipedia.org/wiki/IP_address: ip range 10.0.0.0 - 10.255.255.255 is also a reserved range.
I couldn't nslookup or ping 194.72.7.142 : is that a private server?
 
Old 10-07-2009, 10:40 AM   #12
slack---line
Member
 
Registered: Jul 2003
Location: Sheffield, UK
Distribution: Gentoo/Slackware10.0@AthlonXP2600, 1Gb RAM; Slackware9.1@Dell Latitude X300; Gentoo@Ultra10
Posts: 48

Original Poster
Rep: Reputation: 15
Right, cheers for the pointers guys.

There is another set of firewalls in place that I was completely unaware of and it does appear as though port-forwarding isn't established correctly.

I've taken the computer out of the DMZ, put it on the local intranet and can access web-pages fine.

Apparently the people in charge of this extra firewall are "looking into the problem" (i.e. someones not in work today and I have to wait until they are back tomorrow before it can be fixed!).

Cheers for the help/pointers, kind of glad to know that its not anything I did!

slack
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apache config vs public dns syok Linux - Enterprise 1 02-07-2009 07:44 AM
Apache -- Changing requested URL to another name AnthonyM Linux - General 0 09-24-2004 07:34 PM
dns setup help requested. gonus Linux - Networking 11 07-13-2004 06:11 AM
config.sub manufacture not recognised drwolfson Linux - Software 1 02-06-2004 08:24 AM
Newbie Here . . . Having Problems with Apache Server Config and DNS. flem26 Linux - Newbie 6 03-08-2003 07:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration