Re: [gentoo-user] Naming servers on a network with one IP
Thats seems a good configuration, but what about /etc/hostname? thats what im not sure of, how to set what the box sees as its own hostname, without setting it to the domain (because thats the router/network), but still with Postfix and apache running. I guess I can use the config files for them as Neil, suggested. The behavior I was seeing is that I did not set the hostname in apache's config, but set it to hostname myhostname. On 5/12/05, Iain Buchanan [EMAIL PROTECTED] wrote: On Thu, 2005-05-12 at 02:34 -0400, Calvin Spealman wrote: ive got a network question. i have a few machines on my local network, but only one IP. But, i don't intend to run all the server daemons on one box for long. i want to be able to address the different boxes by unique names from within the network sounds simple enough. so just give them each their own name within your network (a, b, c); and put it in /etc/hosts of each machine. Then put in /etc/hosts (or leave it up to the DNS) your external host name (x.com) which points to the router. eg /etc/hosts: 192.168.1.1 a 192.168.1.2 b 192.168.1.3 c 216.239.32.10 x.com your router forwards to each machine from the outside based on port. Each box thinks it is only called a, or b, or c, (or a.x.com if you like) but then configure the service on the box to think it is your outside name (x.com). eg in your apache.conf on machine a, you can say the hostname is x.com, in your postfix conf on machine b, you say the hostname is x.com. Internally, any machine can connect to a service on the virtual x.com, which goes to your router and back in to the correct machine (so long as your router is smart enough to do this without sending the traffic to your isp and back). Or, internally, you can connect to the correct machine, by just using a, b, or c, because you set it up and you know which is which. externally, all anyone knows about is x.com, which is listening on multiple ports. I did a similar thing at home with various services (I used to have 3 machines but I scaled back to 1!) HTH, -- Iain Buchanan [EMAIL PROTECTED] -- gentoo-user@gentoo.org mailing list -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Naming servers on a network with one IP
On Fri, 13 May 2005 02:08:54 -0400, Calvin Spealman wrote: Thats seems a good configuration, but what about /etc/hostname? thats what im not sure of, how to set what the box sees as its own hostname, without setting it to the domain (because thats the router/network), but still with Postfix and apache running. /etc/hostname doesn't matter here. It is common for a server to have several, even many, domain names. As long as the server config contain the correct information, you will be OK. My mail server handles mail for about a dozen domain names, the only place most of these appear in in the Postfix config file. -- Neil Bothwick Indecision is the key to flexibility. pgpYf04f2AT75.pgp Description: PGP signature
Re: [gentoo-user] Naming servers on a network with one IP
On Thu, 12 May 2005 02:34:11 -0400, Calvin Spealman wrote: ive got a network question. i have a few machines on my local network, but only one IP. I can congure my router for all the proper port forwarding for my server, but hostnames is giving me some confusion. To run a lot of things properly, such as Apache and Postfix, i need a qualified hostname configured for the server. But, i don't intend to run all the server daemons on one box for long. I can't give the same name to multiple servers, and i want to be able to address the different boxes by unique names from within the network (got a nifty naming scheme and everything), so how can i go about the best set up here? Just name them as you see fit. The names are only applicable to your private network. Externally, all public names will point to your one public IP address and your router will take care of forwarding the requests for each service to the correct box. For example, www.mydomain.org, ftp.mydomain.org and mail.mydomain.org will all resolve to your public IP address, but you may have something like this /etc/hosts setup for your lan 192.168.0.1 box1 www.lan 192.168.0.2 box2 ftp.lan 192.168.0.3 box3 mail.lan As long as your router forwards ports 80, 21 and (25|110) to 192.168.0.1,2,3 respectively, it should all work, with no one on the outside knowing anything about your local network. -- Neil Bothwick Keyboard: (n.) a device used by programmers to write software for a mouse or joystick and by operators for playing games such as 'word processing.' pgp8bCev63FgY.pgp Description: PGP signature
Re: [gentoo-user] Naming servers on a network with one IP
On Thu, 12 May 2005 11:45:47 -0400, Calvin Spealman wrote: This is as I had hoped, and maybe I'm doing something wrong, but if I don't give my boxes a proper domain name, apache and postfix will not start. They complain about the domain name and bail out. You can give them any name you like, including the same name as given to your external interface. Just put www.mydomain.com as an alias in /etc/ hosts. note that both Apache and Postfix require you to specify the server name in their config files, ServerName in /etc/apache2/httpd.conf and mydestination in /etc/postfix/main.cf. -- Neil Bothwick The computer revolution is over. The computers won. pgpLBqLwgjWTg.pgp Description: PGP signature
Re: [gentoo-user] Naming servers on a network with one IP
On Thu, 2005-05-12 at 02:34 -0400, Calvin Spealman wrote: ive got a network question. i have a few machines on my local network, but only one IP. But, i don't intend to run all the server daemons on one box for long. i want to be able to address the different boxes by unique names from within the network sounds simple enough. so just give them each their own name within your network (a, b, c); and put it in /etc/hosts of each machine. Then put in /etc/hosts (or leave it up to the DNS) your external host name (x.com) which points to the router. eg /etc/hosts: 192.168.1.1 a 192.168.1.2 b 192.168.1.3 c 216.239.32.10 x.com your router forwards to each machine from the outside based on port. Each box thinks it is only called a, or b, or c, (or a.x.com if you like) but then configure the service on the box to think it is your outside name (x.com). eg in your apache.conf on machine a, you can say the hostname is x.com, in your postfix conf on machine b, you say the hostname is x.com. Internally, any machine can connect to a service on the virtual x.com, which goes to your router and back in to the correct machine (so long as your router is smart enough to do this without sending the traffic to your isp and back). Or, internally, you can connect to the correct machine, by just using a, b, or c, because you set it up and you know which is which. externally, all anyone knows about is x.com, which is listening on multiple ports. I did a similar thing at home with various services (I used to have 3 machines but I scaled back to 1!) HTH, -- Iain Buchanan [EMAIL PROTECTED] -- gentoo-user@gentoo.org mailing list