Current time: 11-23-2024, 01:23 PM Hello There, Guest! (LoginRegister)


Post Reply 
Which IP? Apache BIND Internal External? arrrggh
Author Message
robbo007 Offline
Junior Member
*

Posts: 136
Joined: Apr 2009
Reputation: 0
Post: #1
Question Which IP? Apache BIND Internal External? arrrggh
Hello all,

I installed ISPCP (Debian) with an internal class C address 192.168.1.x and then later added my external IP 212.x.x.x to the system so the reseller can have access to it.

As a Reseller I add a new domain and assign the external IP address. Bind works fine and resolves the domain but apache only seems to work if I manually hack the config files to and state my internal IP.

Is this normal? Do I have to hack the apache config for each site? What's the best solution to have ISPCP do all the work.

Thanks,
Rob
05-06-2009 12:43 AM
Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #2
RE: Which IP? Apache BIND Internal External? arrrggh
Are you using any kind of NAT? If the machine [b]really[b] has the IP (assigned to an interface), apache should be able to listen on it and everything should work.

Meanwhile, please post the apache error output so we can see what is happening...
05-06-2009 12:46 AM
Visit this user's website Find all posts by this user Quote this message in a reply
robbo007 Offline
Junior Member
*

Posts: 136
Joined: Apr 2009
Reputation: 0
Post: #3
RE: Which IP? Apache BIND Internal External? arrrggh
As this is still a test environment I have the Debian setup at home.

ADSL router (one fixed external IP) Debian connected to router using internal 192.168.1.x address. Port 80 in the router open and pointing to my debian box on the internal IP.

I get no errors only that mydomain.ltd does not resolve correctly unless I hack and specify the internal IP of the debian box in the /etc/apache2/sites-enabled/ispcp.conf

if I leave it as created by ISPCP with the external IP it will resolve mydomain.ltd to the ISPCP logon screen that I use on admin.mydmain.ltd

This happens to all domains I add.

How can I post the output. (Sorry I'm a new user)

Thanks,
Rob
05-06-2009 01:03 AM
Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #4
RE: Which IP? Apache BIND Internal External? arrrggh
Ok so you are using NAT. Although it is an unsupported setup (we're sorry Tongue), you can make it work by:

1. Using only the internal IP everywhere
2. Use an external DNS service for users outside of your LAN (yeah, you will have to manually create the records there).

This is the simplest setup that will allow you to serve pages and send/receive mails (provided you forward the corresponding ports, of course).

You can not use external IP's in the apache config, and bind may also cause some problems with local dns requests when serving external IP's. You could look at bind's documentation on how to serve different records depending on the client (external clients get external IP's, internal clients get internal IP's), but it would require an effort that I simply wouldn't take for a simple test machine Smile
(This post was last modified: 05-06-2009 01:54 AM by kilburn.)
05-06-2009 01:54 AM
Visit this user's website Find all posts by this user Quote this message in a reply
robbo007 Offline
Junior Member
*

Posts: 136
Joined: Apr 2009
Reputation: 0
Post: #5
RE: Which IP? Apache BIND Internal External? arrrggh
ok thanks for your help.

As this is a test environment and I will eventually setup the server in a housing environment with only the external IP address assigned.

Will it all work correctly if I setup ISPCP and debian again only using my 212.x.x.x address? Is that the correctly way?

Rob
05-06-2009 01:57 AM
Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #6
RE: Which IP? Apache BIND Internal External? arrrggh
yup, just make sure to use 212.x.x.x as the primary nameserver of your machine when testing (and add the directives allow_recursion and allow_query_cache for your localnet in named.options if they aren't there) Smile
05-06-2009 03:34 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)