Setting up a Webserver on a Home BB connection.

I had my website with a hosting company but my contract for that service has recently expired.

I am a SW Developer and having more control over the webserver appeals to me and I also find this area interesting and I am eager to learn more about it. So I would like to run my own webserver to run off my broadband connection.

I have spare machines to act as the server. Its  a 1Ghz PIII with 128mb ram. Its no monster but I think it will do the job.

I will install Linux and Apache server and MySQL on the machine, I think this will cover my requirements.

The part that I am most lost on is the setting up of the network.

I will give a summary of the Hardware.

The connection is a 500kb.
The modem/router is a ZyXEL Prestige 600. ( I currently connect directly to it from my laptop through a network cable) (The is a usb connection as well but I’m not using that)
I have a hub which is called D-Link 10/100 Fast Ethernet Switch DES-1005D and a collection of cables.
A Dell Inspiron 4150 Laptop currently connected to the broadband.
A Dell Optiplex GX110 which will act as the webserver.

I know that the IP address that I get from the BB is not a static IP address so I was planning to use a Dynamic DNS Service so get around this.

I have been looking around on google for a while and not found a solution (i'm a lot more confused now though) but I saw DMZ boxes being mentioned quiet a bit but also that this is not a good solution as it is not very secure!

So the question is this:

How should I set everything up so I can still connect to the web with my laptop and run the webserver off the same connection, all the while still being secure. (Also if it doesn’t ruin my ping in CS that would be an added bonus ;-)

Thanks for your time
Who is Participating?
pablouruguayConnect With a Mentor Commented:
ok. you need to configure the dhcpd server in your server. download the dhcp package or check if not installed yet and modify the file /etc/dhcpd.conf my dhcpd for this is that

#ddns-update-style ad-hoc;
ignore client-updates;
ddns-update-style interim;

# local
subnet netmask {
        option routers;
        option subnet-mask;
        option domain-name "";
        option domain-name-servers;
        option time-offset -03000;
        default-lease-time 600;
        max-lease-time 7200;
        allow unknown-clients;

ok. you need the service to do that.

after that

you need to put the server woth iptables.

the server have the work for Firewall / Nat / server internal network

you need to add a virtual network address example to the server and connect the laptop in other port in your hub

and in the server you need to add these sentences

iptables -P INPUT DROP

iptables -P POSTROUTING ACCEPT -t nat
iptables -P PREROUTING ACCEPT -t nat
iptables -P OUTPUT ACCEPT -t nat
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -A FORWARD -j ACCEPT -i eth0 -o eth0 -d 0/0
iptables -A FORWARD -j ACCEPT -i eth1 -o eth1 -d 0/0

iptables -A FORWARD -j ACCEPT -i eth1 -o eth1 -d 0/0
iptables -t nat -A POSTROUTING -s -j SNAT --to youripnetwork

Woody_FXAuthor Commented:
So what you are saying is that i connect the bb modem/router to the hub and then both systems in to hub.

Then after I have installed Linux there will be a feature called iptables? And  run these commands at the prompt.

Will there be any settings required for the laptop since it will no longer be connecting directly to the hub? Auto assign IP address for the laptop?

Can you go into more detail as I am a noob in this area and you've outlines the main points but my knowledge of networking is insufficient to make the jumps between them.

Thanks for your advice pablourugury

Woody_FXAuthor Commented:
Also i can set settings on the Modem router should anything be changed here or leave it as it is?

I can go on there and list them out if you need to know!

so ?? work ?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.