Dhcp

pc engine - pfsense as router / firewall

download (1)Just built a pfsense router on  a pc engine to replace my aging 7390 fritzbox…. Very very awesome and fast!

Perfect for UFB (ultra fast broadband) here in New Zealand - FTTH has arrived :)

I’m currently running these services on it (2 x 1GHZ cpu, 4GB RAM, 16GB msata SSD);

  • dhcpd - DHCP server
  • miniupnpd - UPnP server
  • ntpd - NTP server
  • squid - Transparent Proxy & Reverse Proxy
  • snort - IDS (Intrusion Detection System) / IPS (Intrusion Prevention System)
  • ssd - SSH server
  • unbound - DNS Server
  • ipsec - IPsec VPN (site to site VPN)
  • openvpn - Open VPN (client VPN)

Check these links for some great advise…

opensolaris - setting up dhcp

You’ll need these two packages installed;

SUNWdhcs, SUNWdhcm

First ensure that the DHCP service is running. Go into the “services” gui and tick the box to enable the DHCP server.

now from commandline run…

dhcpmgr
  1. From edit menu choose “network wizard”, step through the wizard (defautls are o.k i you have a fixed IP already assigned to your opensolaris box)
  2. From edit menu choose “address wizard”

If you step through the wizard (the following is an example of what i have choosen)

WPAD - Web Proxy Autodiscovery Protocol

When using wpad there are some things that you should take note of;

  • DHCP wpad will override DNS wpad
  • DHCP 252 option can in some cases be slightly slower to resolve than DNS - there may be a patch for WinInet to resolve this.
  • You should always use lower case - wpad.dat  (it is case sensitive)
  • DHCP will allow either a URL or a file location for wpad.dat

Within IE on the LAN settings tab if you have WPAD “automatically detect settings” enabled and also configure a proxy server the WPAD should override the manual proxy configuration.

Linux - Add DHCP and DNS

How to install DHCP and DNS on Fedora / Centos / Redhat box;

yum -y install dhcp.i386 bind.i386

Set services to auto start using ntsysv – services are called “dhcpd” and “named”.

How to configure dhcp;

nano /etc/dhcpd.conf — configure as per sample provided. The sample is usually located in the same directory. service dhcpd restart - should start without problem if done correctly

Note: dhcp range has to be on the same network as your adapter. You can run dhcpd from the command line to diagnose any issues.