Koozali.org: home of the SME Server

How to change DHCP Server settings?

Offline hgencer

  • 3
  • +0/-0
How to change DHCP Server settings?
« on: May 07, 2009, 11:52:30 PM »
Hi. I am a new user in SME Server. i installed SME Server 7.4 on my old computer((PIII 500,256MB RAM,20 GB HDD,3COM NIC)

i have a problem:
  I want to use DHCP for my network ip configuration. But i can't change any settings on DHCP Server. i changed /etc/dhcp.conf, but it's not applied. when restarted computer then dhcp.conf back to first configuration. I want to changes default router and DNS settings on DHCP server. Because i want to use transparent proxy for my network and we have'nt any other DHCP Server on my network.

I'm not understand any template configuration and applicating on SME Server. Please help me!

(Sory for my bad English...:))

Offline uniqsys

  • *
  • 133
  • +0/-0
Re: How to change DHCP Server settings?
« Reply #1 on: May 08, 2009, 12:19:39 AM »
Hi. I am a new user in SME Server. i installed SME Server 7.4 on my old computer((PIII 500,256MB RAM,20 GB HDD,3COM NIC)

i have a problem:
  I want to use DHCP for my network ip configuration. But i can't change any settings on DHCP Server. i changed /etc/dhcp.conf, but it's not applied. when restarted computer then dhcp.conf back to first configuration. I want to changes default router and DNS settings on DHCP server. Because i want to use transparent proxy for my network and we have'nt any other DHCP Server on my network.

I'm not understand any template configuration and applicating on SME Server. Please help me!

(Sory for my bad English...:))


Welcome to the forums!  :smile:

Assuming you have the SME server as the Server/Gateway and you want to configure DHCP on it (that is what you mean by "DHCP server") then do this:

Go to the console of the server either physically or by SSH with Putty or something similar.  (I would suggest that you do so physically not remotely.)  Login as "admin" and give the password.

If you do that correctly you will be at a screen that is known as "Server Console".  Go to the option "Configure this server".  Follow the screen prompts until you get to the "Select DHCP Server Configuration" screen and make your choice.  If you set it to yes to let SME provide DHCP, then the system presents following screens that let you set the IP range and mask.

Continue through the screens to the last screen and say "yes" to apply changes and reboot.

More can be found in the manual at http://wiki.contribs.org/SME_Server:Documentation:Administration_Manual:Chapter5

You do not need to edit templates, make custom templates or edit conf files to do this.
...

Offline markleman

  • ***
  • 66
  • +0/-0
    • http://www.leman.net
Re: How to change DHCP Server settings?
« Reply #2 on: May 08, 2009, 12:28:11 AM »
Quote
I want to use DHCP for my network ip configuration.

SME server can easily act at a DHCP server for your network, you enable this during the initial install, see http://wiki.contribs.org/SME_Server:Documentation:Administration_Manual:Chapter5#Configuring_Your_DHCP_Server.

If you did not enable this during install you can re-configure by 'SSH'ing to your server with the username 'admin' and your admin password.

Once you have enabled DHCP all the configuration files will automatically be generated by the template system so you don't need to (and shouldn't) modify the configuration files directly your self.

Mark Leman 

edit : uniqsys beat me to the answer ;-)
« Last Edit: May 08, 2009, 12:29:44 AM by markleman »

Offline hgencer

  • 3
  • +0/-0
Re: How to change DHCP Server settings?
« Reply #3 on: May 08, 2009, 08:50:11 AM »
  Thanks for your repplies.I'm installed and running DHCP Server. Bu i want changes DHCP Server's "option router" settings.

----------||--------------------||-----------------------||--||-----||---||--||
     ADSL Router                  SME Server                         Any Other Clients(Windows or Linux)
     (192.168.2.1)                (192.168.2.254)

I have a ADSL Router. My ADSL router ip is : 192.168.2.1
My SME Server's IP is : 192.168.2.254
My SME Server's Default gw is my ADSL Router. I want to make use transparent proxy for my network.

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: How to change DHCP Server settings?
« Reply #4 on: May 08, 2009, 09:11:23 AM »
  Thanks for your repplies.I'm installed and running DHCP Server. Bu i want changes DHCP Server's "option router" settings.

----------||--------------------||-----------------------||--||-----||---||--||
     ADSL Router                  SME Server                         Any Other Clients(Windows or Linux)
     (192.168.2.1)                (192.168.2.254)

I have a ADSL Router. My ADSL router ip is : 192.168.2.1
My SME Server's IP is : 192.168.2.254
My SME Server's Default gw is my ADSL Router. I want to make use transparent proxy for my network.


hgencer, is your SME in server & gateway mode or server only?

Stefano

Offline hgencer

  • 3
  • +0/-0
Re: How to change DHCP Server settings?
« Reply #5 on: May 08, 2009, 09:28:39 AM »
in Server Only.

Offline mmccarn

  • *
  • 2,653
  • +10/-0
Re: How to change DHCP Server settings?
« Reply #6 on: May 08, 2009, 03:00:20 PM »
You can change or eliminate the default gateway setting from dhcpd on your SME server by creating a custom template fragment for /etc/e-smith/templates/etc/dhcpd.conf/25Routers, like this:
Code: [Select]
mkdir -p /etc/e-smith/templates-custom/etc/dhcpd.conf
cd /etc/e-smith/templates-custom/etc/dhcpd.conf
echo 'option routers 192.168.2.254' > 25Routers
signal-event remoteaccess-update

I don't know if this will force users to use the SME proxy as you want, since I don't know if the transparent proxy can be enabled in server-only mode, but it will change the default gateway provided to DHCP clients.

You can definitely force your clients to use the SME proxy by making a slight change to your network:

1) Change your SME server from server-only to server-gateway
2) Change either the network number between your SME and your ADSL router, or change the network number used on the LAN, like this:

Code: [Select]
  (WAN:a.b.c.d)
          |
     ADSL Router        (WAN:192.168.2.2)
          |--------------------|
  (LAN:192.168.2.1)       SME Server
                               |-----------------------||--||-----||---||--||
                       (LAN:192.168.200.1)         Any Other Clients(Windows or Linux)
                                                          (192.168.200.x)

Offline markleman

  • ***
  • 66
  • +0/-0
    • http://www.leman.net
Re: How to change DHCP Server settings?
« Reply #7 on: May 08, 2009, 03:54:02 PM »
Hi hgencer,
Unless you have a really good reason not to, I would go with mmccarn's second suggestion of using the SME server in server-gateway mode, with the ADSL router on the WAN/'outside' and the other network devices on the LAN/'inside'.

I have several SME servers in this configuration and it is an 'out of the box' configuration for SME server so everything will just work as intended. Also because our ISP gives us a small block of fixed IP address I don't even need the ADSL router to do NAT, the SME server gets it's own real IP address. This removes the need to do any port forwarding on the ADSL router to get incoming services like email,ssh,ftp,http etc to work.

Mark Leman

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: How to change DHCP Server settings?
« Reply #8 on: May 08, 2009, 05:26:44 PM »
  Thanks for your repplies.I'm installed and running DHCP Server. Bu i want changes DHCP Server's "option router" settings.

----------||--------------------||-----------------------||--||-----||---||--||
     ADSL Router                  SME Server                         Any Other Clients(Windows or Linux)
     (192.168.2.1)                (192.168.2.254)

I have a ADSL Router. My ADSL router ip is : 192.168.2.1
My SME Server's IP is : 192.168.2.254
My SME Server's Default gw is my ADSL Router. I want to make use transparent proxy for my network.

You cannot use transparent proxy for your network unless your SME server is between your LAN and the router.

Offline johnp

  • *****
  • 312
  • +0/-0
Re: How to change DHCP Server settings?
« Reply #9 on: May 10, 2009, 01:32:18 AM »
I agree with mmccarn and markleman, turn the DSL router into a basic DSL modem. Use SME in server-gateway mode to authenticate and obtain external ip address. This is easily doable with a little research, and you'll get to use all the features SME has to offer. If your DSL isn't supplying a static ip, I'd also setup an account with dyndns.org (a built in supported feature) so you can access the server remotely.

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: How to change DHCP Server settings?
« Reply #10 on: May 10, 2009, 09:59:49 AM »
turn the DSL router into a basic DSL modem. Use SME in server-gateway mode to authenticate and obtain external ip address.

I think this is not necessary..

hgencer: follow mmccarn's advice..

Ciao
Stefano