Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/tetrac2/public_html/smf_forum/Sources/Load.php(225) : runtime-created function on line 3
Setting Linux Box as Name Server and Router
TETRA - Tech Teams for Resourceful Applications
December 16, 2017, 01:17:26 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: SMF - Just Installed!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Setting Linux Box as Name Server and Router  (Read 2087 times)
glforbes
Administrator
Newbie
*****
Posts: 5


View Profile
« on: July 19, 2010, 10:29:24 PM »

Since we are running a Linux OS as our web server, the question is "Why do we need to have a separate router?" We can set up our web server to also act as the DNS server and router. Linux provides two programs to do this. Bind is the router and DHCP is the DNS server. We will not go into the the use of these two programs here. We covered this in earlier forum topics.

We want to cover the many hair pulling experiences we had in trying to get this to work. Well we started this by removing the D-Link router from our setup. That was easy. We now just plugged the Cat-5 cable from the router into the back of the Web server. Yikes! It works. Boy that was sure easy. My local web server can access the Internet, but we have to understand what is going on here.

After some Internet searches I find that all my Ethernet ports are protected by a firewall. Well the good news is, that all the common Internet protocols are already open for most firewalls. OK! We now know why it works out of the box. Also  our DHCP and Bind are not working because they are not need. I don't have any lan computers hooked up yet. I do have access to my local web pages using the long URL. They are routed by my local service provider. Great! Now all I have to do is setup the DNS server and DHCP.

Well here is where all my problems begin. I plug in a local lan computer in to the second Ethernet port eth1. Of course it "don't work". I fiddle with the DHCP configuration. For the DNS server IP, I try 120.0.0.1 and my ip assigned in /etc/host 192.168.0.1. It "don't work". The only one I get to work is the one given to me by my service provider located in /etc/resolv.conf. This by passes my DNS server and the lan users are happy they have an Internet connection. I'm not happy because they can not access my local web server. Ok my server is not that important as long as there is Internet access.

We use this configuration for about three months until my service provider discovers I'm hosting a web server. They start to change my IP address every day. I respond by using the program "ifconfig" to find my IP address for that day. I now have to go to "/etc/dhcp3/dhcpd.conf" and change the domain name server each day. This goes on for another two months, so I figure I should figure out the problem and fix it.

This post is still in progress.
« Last Edit: July 29, 2010, 05:23:38 PM by glforbes » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!