Link to home
Start Free TrialLog in
Avatar of Woody_FX
Woody_FX

asked on

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
Brian
Avatar of Pablo Allietti
Pablo Allietti
Flag of Uruguay image

ok. you need the www.no-ip.org 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 192.168.1.1 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 OUTPUT ACCEPT
iptables -P FORWARD ACCEPT

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 192.168.1.0/255.255.255.0 -j SNAT --to youripnetwork

Avatar of Woody_FX
Woody_FX

ASKER

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

Brian
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!

Brian
ASKER CERTIFIED SOLUTION
Avatar of Pablo Allietti
Pablo Allietti
Flag of Uruguay image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
so ?? work ?