Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Web Server (Apache) set up for a newbie


    I am trying to set up a webserver (Apache) on a CentOS box. This is the first webserver i have set up so im a complete newbie.

    I have been assigned a static IP from the ISP, and it seems to have plumbed itself to an interface on my modem on a ppp0 interface. I have set up my CentOs box behind this modem and have assigned this an ip of, and have completed an AMP installation on this CentOS box.

    My first question is, well, am i correct so far ? I was under the impressing the static IP should sit on the CentOS box and not on the modem.

    Anyone that has just set something like this up, i would appreciate some help. This is just a very high level question to begin with as i want to make sure that i am not doing something very silly.

  2. #2
    Hello, and welcome to the forums.

    The static IP assigned to your modem is a routable IP address, or also known as a 'public IP address'. The IP you've assigned to your CentOS box is called a non-routable, or private IP. So far, so good. You always want to have a static IP on a server, for a myriad of reasons. If your intention is to allow public/internet access to the web server on your CentOS box then you should also have a static IP on your modem. Depending on your service provider, you might not have the option to assign a routable IP address to your CentOS box. To that end, I wouldn't want to be able to. You'll want a firewall in front of your web server so that only the web site(s) you are hosting are accessible, else you might as well paint a big red target on your CentOS box.

    You mentioned "ppp0", but I can only assume you mean "pppoe", which is usually for DSL. You can expose your CentOS server to the world in a couple different ways. You can:

    1. put the server in the DMZ on your router, which is exposing the whole server (not good)
    2. get a router that supports a 1-to-1 static NAT, which is necessary if your ISP will allow you to have multiple public IP addresses
    3. get a firewall that will allow you to expose services on a server based on an IP/port combination

    Good luck!

    Cheers ~

  3. #3
    Thats very much for the reply

    So its seems i'm not a millions miles away. So, the idea is to expose a web page to the world at the end of all of this for my own benefit. The content will be built on a LAMP stack where i will hopefully have some kind of user/password authentication originally until i find out a bit more around the security hazards. This user/password will probably be through a PHP form .. Please let me know if this makes sense as these are just my thoughts on how it might work, but not necessarily correct.

    Currently, I am using the below, which looks a bit out of date, but i am hoping will still be sufficient.

    http : //dlink. co. nz / products / ?pid=723 (sorry, its not allowing me post the vaild link, please remove spaces)

    I have seen a DMZ zone set up when i logged into the router, so if that is not advised, then i will stay away. (Thats for the advise)

    Looks like the router supports a 1-to-1 static NAT so maybe that is the road that i should take.

    So, from another box within the private subnet,, i have tried the the static IP but keep hitting the router set up page. How should i go about routing this traffic to in the private network as i guess the static IP that the ISP provided will be what i will ultimately use to access my soon to be web page ? Port forwarding ?

    Thanks in advance

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts