Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251
Rep:
How do I configure a proxy and DHCP server
Hi all,
So I am trying to configure my CentOS 5.0 server as a proxy and DHCP server. So far my investigation and digging into how to setup one of these puppies requires Squid and the configuration of /etc/dhcpd.conf file. Now I am Googling what I can but if anyone has setup a proxy and DHCP server and can point me in the right direction or even to a tutorial that would be great!
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251
Original Poster
Rep:
CentOS 5 with Poxry-> Squid and DHCP Server
Thanks for the replies!
DHCP SERVER
First off I am having some difficulties with the DHCP server. I have Googled many different tutorials but they all are different. They have many similarities but none are consistently the same. Here is how I plan to setup my DHCP server:
dhcpd.conf Configuration
This is how I think my dhcpd.conf should look:
Code:
ddns-update-style none; # keep it simple for now
ignore client-updates; # here too
DHCPARGS=eth1; # tells it what interface to listen on
subnet 192.168.0.1 netmask 255.255.255.0 {
# --- default gateway
option routers 192.168.0.2; # gateway on your eth1 internal interface
option subnet-mask 255.255.255.0; # subnet mask
option domain-name mydomain.com; # domain name given to client
option domain-name-servers 192.168.0.1; # the IP of your ISP's nameservers you're using
option time-offset -7; # Mountain Standard Time - set to what you have
range 192.168.0.10 192.168.0.254; # the range of IP's your clients will get
default-lease-time 21600; # how long the client's will keep the same IP
max-lease-time 43200;
}
eth0 configuration
eht0 is the NIC that has connects to the ISP
So, if anyone could confirm or help me with my DHCP server settings that would be great. I manage to get my server to serve DHCP but I don't get internet access. I am guessing my gateway, subnet or IP is wrong.
SQUID
As for Squid well I just wanted to use it to cache anything done on the internet. I am going to use this server in a technician bay so we can store updates and files we use a lot, that way when I have 10 computers on the tech bench they all access the same server and download via the cached info.
I then ran the IPtables settings and restarted squid. I haven't go to test this yet since my DHCP server isn't working yet. I did notice that the change to IPtables didn't save. I will working on that when I get there.
dbmacartney, I will do a little more research but could you explain to me there different types of porxy servers? based on what I want this server for maybe you can narrow down the type of proxy I should be using.
Quote:
What kind of idea did you have for your squid deployment? transparent, authenticated, did you wish to allow or deny specific sites/networks/users??
DHCP is reasonably simple, so go to a client machine and type "ifconfig" and see if it looks like it's getting what it needs (valid IP, etc). It probably is.
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251
Original Poster
Rep:
CentOS DHCP Server - no internet
Hi all,
Thanks billymayday for the reply. I did do that in the original setup but it seems as though it didn't save. I did edit the file /etc/sysconfig/network so that is has the following line:
I see that you have put a lot of time and effort into making you box work, but try IPCOP (www.ipcop.org). It offers all that stuff already configured plus alot of addons.
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251
Original Poster
Rep:
Thanks martinezjr, I will look into that once I have accomplished setting up my DHCP server. When I get it up and working it is another piece of the open source world I can give back and help someone else with... Plus its just good to know!
billymayday, I will try what you suggest and see if that helps. Thank you very much for your help thus far!
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251
Original Poster
Rep:
DHCP and Proxy Server with Dual NICS
Hi Billymayday (and others)... I am finally going to re-attempt my DHCP and Proxy server setup. I wanted to clear up a few things first:
1) my server has dual nics, eth0 and eth1
2) I would like eth0 outward facing, meaning it plugs directly into my cable modem and sits between the internet and my home network
3) I would like eth1 to connect to my internal network, thus providing the computers connected via eth1 through a switch with DHCP and Proxy access (probably and most definitely firewall services as well)
The link you gave me Linux Home Networking, looks as though they only show this setup on one NIC, I need someone to help or provide me with a link that shows an example of how I want to setup my DHCP server...
Any ideas, maybe the link you gave me does explain exactly this and I am just not getting it? I really need someone to "hold my hand."
You're going to have to give us an update on exactly where you are at I think.
In terms of dhcp though, if you have 2 NICs, one with an IP of 192.168.0.1 (external) and the other 192.168.1.1 (internal), I have my dhcpd.conf set up along the lines of:
Code:
subnet 192.168.0.0 netmask 255.255.255.0 { }
subnet 192.168.1.0 netmask 255.255.255.0 {
normal dhcp options go here (range, etc.)
}
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251
Original Poster
Rep:
Ok, I will post back once I have got all the info... I have a test machine that I am going to reset and record all my steps then post back in the next couple of days.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.