Home Home > 2009 > 06 > 03 > Sending Proxy Settings via DHCP
Sign up | Login

Deprecation notice: openSUSE Lizards user blog platform is deprecated, and will remain read only for the time being. Learn more...

Sending Proxy Settings via DHCP

June 3rd, 2009 by

It’s a bit “overdressed” for my little homenet, but playing around with DHCP, DNS and YaST is always interesting….

My DHCP Server at home is configured to use LDAP – and I’ve done the configuration via YaST. Now I read in some M$ pages, that it’s possible to tell the Clients via DHCP (and Apache) to use my Proxy server automatically. (Yes, my wife still needs Win** for her schoolwork.)

First, I had to figure out how I can insert two “non standard” options into the LDAP configuration of the DHCP server. I called “yast2 dhcp-server” (thanks for the tab completion, btw!), marked the “Global Options” entry and clicked on “Edit” (not Add!). On the next page, click on “Add” to add a new Option. Just delete the first available entry “allow” and replace it with the full line as you would write it in dhcpd.conf. In my case, this is
option wpad code 252 = text;
and
option wpad “http://myserver/proxy.pac\n”;
(dunno if the “\n” is really needed). That’s the trick. Have a look at /var/log/messages in a separate terminal when you finish the yast2 dhcp-server module to catch possible errors.

Now all what’s left is a running apache server on “myserver” delivering the “proxy.pac” file to your users. The file content is well known – and google would find hundreds of examples for you.

Both comments and pings are currently closed.

One Response to “Sending Proxy Settings via DHCP”

  1. Lars,

    Thanks for the post, it’s a very interesting way to do it. We are ‘still’ in the traditional way of configuring the proxy using the pac script manually.
    The biggest issue is that dozens of apps just don’t understand pac files:
    – zypper (actually it’s aria2c and wget) for example.

    Maybe you can help me ‘market’ libproxy 🙂

    Then you can have even more fun with your new proxy settings.