Lightsquid not showing DNS names

  • Ive tried every setting from IP to Squidauth, and all I can get Lightsquid to do is show the IP, but never the DNS entry for the machine.  Any ideas?

  • Ou must read description for LS fields and configure this for DNS resolve. All changes will apply for newest data only. All exists report will continue to remain as is.

  • I have the same problem but i dont understand wnat you mean. Can you explain
    I also have tried MANY combination and it is alwase showing IP and nothing else

  • Set it to DNS, but the DNS server you have pfSense set to use has to be one that has reverse DNS entries for those IP addresses.

    In other words, if this is your home Internet connection and you set pfSense to use DNS server, that server doesn't know anything about your workstations and isn't going to be very helpful.  If you're running it in an office where there is a DNS server that has rDNS entries for the workstations, set pfSense to use that server and it should work.

    (Try this:  On your workstation open a command prompt and run 'nslookup <ip address="" of="" workstation="">'.  If that query doesn't resolve a name, your DNS server doesn't have that information about your workstations.)</ip>

  • Rebel Alliance Developer Netgate

    Also, even if you have pfSense set to register DHCP hostnames in DNS, that only works for clients on the LAN side, not for pfSense services. pfSense uses the external DNS servers for resolution, and not the internal DNS forwarder.

    However, static DHCP leases and DNS overrides do work, IIRC, because they get written to /etc/hosts and are available to pfSense for that reason.

    In 2.0 I believe this has (or will) change to have all of these hosts end up in /etc/hosts so it may not be a problem in future versions.

  • In an environment were pfSense is the only DNS server internally I have configured pfSense to look to itself first.  This is what my config looks like.

    Services | DNS Forwarder
    check - Enable DNS forwarder
    check - Register DHCP leases in DNS forwarder
    check - Register DHCP static mappings in DNS forwarder

    System | General Setup
    DNS Servers
    1st DNS Server -
    2nd DNS Server - <your 1="" preferred="" external="" dns="" server="">3rd DNS Server - <your 2="" preferred="" external="" dns="" server="">With 1.2.3 you'll need Fit123 package. 2.0 includes a 3rd and 4th entry natively.

    uncheck - Allow DNS server list to be overridden by DHCP/PPP on WA</your></your>

  • Seth, does your configuration work, i.e. does LightSquid resolve hostnames in report? Because I have the same problem in environment with no local DNS server, pfSense is DHCP server for LAN workstations, static DHCP is not configured.

  • I would like to share this. somebody might interested.
    pkg_add -r p5-Net-DNS
    overwrite the file /usr/local/libexec/lightsquid/ip2name.dns with the code below.

    #contributor: esl
    #resolve hostname, cache it for speedup
    # -- vim: filetype=perl
    use Net::DNS::Resolver;
    my $res = Net::DNS::Resolver->new(
                   nameservers => [qw(],
                   udp_timeout => 2,
                   retry       => 1,
                  #debug       => 1,
    sub StartIp2Name() {
      my $body = ReadDHCPConfig();
      while ($body =~ m/(\#[^\n]*\n)?lease ([0-9.]*)\s?\{(.*?)\}/sig) {
        my $tmp=$3;
        my $ip=$2;
        $tmp =~ m/client-hostname "(.*)"/;
        my $comp=$1;
        if ($comp ne ""){
    			$id = $comp;
    	$hRealName{$id}=$comp if ($user ne "");
    sub Ip2Name($$$) {
    # $Lhost,$user,$Ltimestamp
      my $ip=shift;
      if (!defined $hIP{$ip}) {
    	if (my $pkt = $res->query($ip)) {
    		for my $answer ( $pkt->answer() ) {
    			my $type = $answer->type();
    			if ($type eq "PTR") {
    				$user = $answer->ptrdname();
    			} elsif ($type eq "A") {
    				$user = $answer->name();
    	} else {
      return $hIP{$ip};
    sub StopIp2Name() {
    sub ReadDHCPConfig() {
      local $/;
      my $file;
      open FFAAAA,"<","/var/dhcpd/var/db/dhcpd.leases";
      close FFAAAA;
      return $file;
    #warning !!!!

    I add the dhcpd leased bec dns will not show the old name, when client switch lan to wlan.

  • Interesting solution chiddy, could be helpful.

    I have tried the solution of Seth and I can confirm that it works!

Log in to reply