• SOLVED: (WPAD) Export Proxy Config through DHCP

    Locked
    5
    0 Votes
    5 Posts
    21k Views
    Y

    Hi, I have integrated the automatic proxy configuration by myself. It is integrated in the gui. Feel free to adopt.

    The files to edit:

    /usr/local/www/services_dhcp.php

    /etc/inc/services.inc

    The modifications:

    /usr/local/www/services_dhcp.php

      $pconfig['failover_peerip'] = $config['dhcpd'][$if]['failover_peerip'];   $pconfig['netmask'] = $config['dhcpd'][$if]['netmask']; +  $pconfig['wpad'] = $config['dhcpd'][$if]['wpad'];   $ifcfg = $config['interfaces'][$if]; ----- $config['dhcpd'][$if]['next-server'] = $_POST['nextserver']; $config['dhcpd'][$if]['filename'] = $_POST['filename']; + $config['dhcpd'][$if]['wpad'] = $_POST['wpad']; write_config(); /* static arp configuration */ interfaces_staticarp_configure($if); ----- Leave blank to disable.  Enter the REAL address of the other machine.  Machines must be using CARP. +                      +                        Automatic Proxy URL +                        +                          +                          +                          This is the URL to the automatic proxy script. + +                                              Static ARP

    /etc/inc/services.inc

    one-lease-per-client true; deny duplicates; EOD; + if (isset($dhcpifconf['wpad'])) { + $dhcpdconf .= "option wpad-url code 252 = text;"."\n"; + $dhcpdconf .= "option wpad-url \"".$dhcpifconf['wpad']."\\n\";"."\n"; + } $dhcpdifs = array(); /*    loop through and deterimine if we need to setup *    failover peer "bleh" entries

    With these slight modifications, there will be an extra field in the dhcp configuration where you can enter the URL to your proxy.pac. I have copied my proxy.pac to /usr/local/captiveportal/captiveportal-proxy.pac and have entered in the Automatic proxy field http://192.168.0.1:8000/captiveportal-proxy.pac.

    My proxy script looks like this:

    function FindProxyForURL(url, host) { if (     (isPlainHostName(host)) ||     (dnsDomainIs(host, ".dsl.local")) ||     (isInNet(host, "10.0.0.0", "255.0.0.0")) ||     (isInNet(host, "172.16.0.0", "255.240.0.0")) ||     (isInNet(host, "169.254.0.0", "255.255.0.0")) ||     (isInNet(host, "192.168.0.0", "255.255.0.0"))   )     return "DIRECT"; else if (     (isInNet(myIpAddress(), "192.168.0.0", "255.255.255.0"))   )     return "PROXY 192.168.0.1:3128"; }

    Cheers,
    Manuel

  • Exclude a dhcp range within a scope

    Locked
    2
    0 Votes
    2 Posts
    3k Views
    H

    The webgui only allws for one range per dhcp server, not multiple ranges. This is not possible atm, at least not from the webgui.

  • Adding static DHCP leases

    Locked
    3
    0 Votes
    3 Posts
    4k Views
    C

    @simpat1zq:

    yeah, i think that it's basically counting 'blank' as a hostname. so you can only have one. I know it used to allow unlimited blank hostnames, but i don't know when it changed.

    Yep, that was it. When I entered hostnames for the subsequent static leases they went through just fine. Thanks a lot for your help!

  • IPrange

    Locked
    3
    0 Votes
    3 Posts
    2k Views
    B

    Hoba

    Again thank you for you help.

  • DDNS is not updating

    Locked
    4
    0 Votes
    4 Posts
    3k Views
    H

    We need more details about your setup then. Is your pfSense WAN IP the real public IP or are you natted behind a router? What's in the logs?

  • DNS names not picked up by bandwidthd

    Locked
    6
    0 Votes
    6 Posts
    8k Views
    P

    Ah! OK Thanks Sullrich, one to put in the wibni list then  :)

  • After DHCP renews, DynDNS doesn't update

    Locked
    5
    0 Votes
    5 Posts
    3k Views
    H

    The waiting for backend issue should be fixed. Please try a reinstall.

  • DNS Forwarder

    Locked
    3
    0 Votes
    3 Posts
    2k Views
    E

    I dont see anything related to DNS being blocked.

  • DHCP Server and WinXP clients

    Locked
    8
    0 Votes
    8 Posts
    4k Views
    V

    Hi Pootle, good to see that you are still active. OFF topic, BTW the other people that are running VMware are telling me that the performance is not bad.

  • PPPoE configuration

    Locked
    4
    0 Votes
    4 Posts
    2k Views
    M

    There were some spaces included in the XML between <pppoe>and</pppoe> tags….. so the problem..... Took of about 7-8 hours.... On a look of it, you wont realize the spaces between the tags... which mattered most. Thanks guys for your help and valuable suggestions.

  • 1:1 NAT V. DNS Forwarder

    Locked
    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Dhcp install bug!

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    J

    never seen this but upgrade to pfsense 1.0.1 15-02-2007

  • Added client to dhcp can't get lease line

    Locked
    2
    0 Votes
    2 Posts
    3k Views
    H

    Anything in the dhcp systemlogs for this mac?

  • Use local dnsforwarder for pfsense

    Locked
    4
    0 Votes
    4 Posts
    3k Views
    H

    The pfSense itself doesn't use the dnsforwarder for lookups. It only uses the DNS configured at system>general.

  • RFC 2136 Dynamic DNS updates. Anyone using them?

    Locked
    1
    0 Votes
    1 Posts
    4k Views
    No one has replied
  • DHCP with DNSMasq

    Locked
    5
    0 Votes
    5 Posts
    3k Views
    L

    OK fair enough, thanks guys

  • DHCP server in pfsense in WDS enviroment

    Locked
    7
    0 Votes
    7 Posts
    6k Views
    H

    The problem here is not WDS, it is only related to the AP-Client mode. WDS mode works like a LAN network

    try to use bridged mode if you have this possibility

  • Other subnet on dhcp

    Locked
    6
    0 Votes
    6 Posts
    4k Views
    Y

    Ok! Thanks a lot ;)
    I will find an other way (hoping its possible ^^')

  • 0 Votes
    9 Posts
    8k Views
    V

    It looks like i did something wrong sometime ago when trying to use static routes
    and probably missed writing a static route for the IP address that i ping on OPT1 interface,
    thus that making both WAN & OPT1 shown as Offline in Status/Load Balancer when doing a failover.

    Every client on the network works fine while browsing when on failover, but
    the pfSense computer has some performance issues at this point with
    DNS resolving from within the pfSense console using host, because it takes several seconds
    to resolve for example www.google.se which only takes below half a second when everything is
    running normal.

    When the primary WAN is offline(load balancer status) and my first static DNS server is the first on the list,
    will pfSense still try to use the WAN NIC(i have added static routes for the DNS servers) to contact my first DNS server?
    Or does it notice this itself and thus going directly for the second DNS server(it too has a static route pointing to OPT1)?
    I'm trying to locate the source of the problem.

    I even noticed that my static routes were gone from Diagnostics/routes, but they were still in
    System/Static Routes. Had to edit one entry(but not changing anything in it) to get the Apply button to appear.
    After pushing the button, my static routes were back in the route table. Strange ???.

  • DNS Server Pfsense

    Locked
    2
    0 Votes
    2 Posts
    3k Views
    S

    The DNS Server is not ready yet and does not appear as an option for a reason.

Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.