Solved

Setting up a Webserver on a Home BB connection.

Posted on 2004-08-09
7
227 Views
Last Modified: 2010-03-18
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
0
Comment
Question by:Woody_FX
  • 3
  • 2
7 Comments
 
LVL 14

Expert Comment

by:pablouruguay
Comment Utility
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

0
 

Author Comment

by:Woody_FX
Comment Utility
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
0
 

Author Comment

by:Woody_FX
Comment Utility
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
0
 
LVL 14

Accepted Solution

by:
pablouruguay earned 500 total points
Comment Utility
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 192.168.1.0 netmask 255.255.255.0 {
        option routers 192.168.1.1;
        option subnet-mask 255.255.255.0;
        option domain-name "lacnic.net.uy";
        option domain-name-servers 192.168.1.1;
        option time-offset -03000;
        default-lease-time 600;
        max-lease-time 7200;
        range 192.168.1.2 192.168.1.195;
        allow unknown-clients;
        authoritative;
        }


0
 
LVL 14

Expert Comment

by:pablouruguay
Comment Utility
so ?? work ?
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
This video discusses moving either the default database or any database to a new volume.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now