pfSense Support Subscription

Author Topic: DNS doesn't resolve pfsense machine name  (Read 2529 times)

0 Members and 1 Guest are viewing this topic.

Offline kelsen

  • Sr. Member
  • ****
  • Posts: 495
    • View Profile
DNS doesn't resolve pfsense machine name
« on: March 23, 2012, 09:38:16 am »
Hello guys!

    I'm using pfsense 2.0.1 with DNS Forward enabled. curiously, machine's names on my lan is being resolved, but not the own name of pfsense. I cant access the samba with the pfsense machine's name, only with IP number.
    Someone know what is happening?!

Thanks!

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 9954
    • View Profile
Re: DNS doesn't resolve pfsense machine name
« Reply #1 on: March 23, 2012, 09:40:10 am »
Did you installed samba on pfsense?

Offline kelsen

  • Sr. Member
  • ****
  • Posts: 495
    • View Profile
Re: DNS doesn't resolve pfsense machine name
« Reply #2 on: March 23, 2012, 11:23:10 am »
??
yes..

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 9954
    • View Profile
Re: DNS doesn't resolve pfsense machine name
« Reply #3 on: March 23, 2012, 12:01:57 pm »
Did you checked

firewall rules?
samba configuration like wins, etc...


Offline kelsen

  • Sr. Member
  • ****
  • Posts: 495
    • View Profile
Re: DNS doesn't resolve pfsense machine name
« Reply #4 on: March 26, 2012, 01:37:53 pm »
what kind of firewall rules could be blocking it if he can be accessed trough IP address?
what directive on smb.conf ?

Offline wallabybob

  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
Re: DNS doesn't resolve pfsense machine name
« Reply #5 on: March 26, 2012, 05:10:23 pm »
I cant access the samba with the pfsense machine's name, only with IP number.
How are you attempting the access? From what OS? Have you tried to specify the fully qualified domain name of pfSense?

Offline johnpoz

  • Hero Member
  • *****
  • Posts: 2889
    • View Profile
Re: DNS doesn't resolve pfsense machine name
« Reply #6 on: March 27, 2012, 07:10:12 am »
"machine's names on my lan is being resolved, but not the own name of pfsense."

Who says dns is doing that?  For all we know your broadcasting for the netbios names and they are resolving that way.  Which would be typical in windows setup, or samba can be setup to respond to netbios broadcast request.

If you want dns to resolve, as requested are you using fqdn or have you setup a suffix search to auto added your domain name, etc.

My pfsense name resolves just fine - because I have setup dns to do so.  

; <<>> DiG 9.9.0 <<>> pfsense.local.lan
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 49664
;; flags: qr aa rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;pfsense.local.lan.             IN      A

;; ANSWER SECTION:
pfsense.local.lan.      1       IN      A       192.168.1.253

;; Query time: 3 msec
;; SERVER: 192.168.1.253#53(192.168.1.253)
;; WHEN: Tue Mar 27 07:12:59 2012
;; MSG SIZE  rcvd: 51


On a side question - why would you install samba on a firewall?
- An intelligent man is sometimes forced to be drunk to spend time with his fools.
- Have I helped you, want to say thanks?  Donate to pfsense the cost of a beer http://pfsense.org/donate.html

Offline kelsen

  • Sr. Member
  • ****
  • Posts: 495
    • View Profile
Re: DNS doesn't resolve pfsense machine name
« Reply #7 on: March 27, 2012, 12:59:07 pm »
actually, he resolves. Sorry about that.
the real problem is that i cant access him trough a Windows SO with \\"pfsense_name", only with IP address.
I mapped the hosts on the lan statically and marked the resolution of names mapped statically in DHCP on dns forwarder, with that I can access the hosts trough \ \ hostname, only the name of pfSense that I can not access that way.
Again, sorry about this confusion, i'm  migrating from linux to pfsense, if u guys can give me a hand.

Offline johnpoz

  • Hero Member
  • *****
  • Posts: 2889
    • View Profile
Re: DNS doesn't resolve pfsense machine name
« Reply #8 on: March 27, 2012, 01:16:22 pm »
and have you tried \\pfsense-fqdn

Like I said \\pfsensename

would be netbios, and yeah if you do not setup samba to respond to that, then it won't, etc.

I have not played with this in quite some time, but I do believe that nmbd is the daemon that responds to netbios requests.  So is that running?

Guess I could fire up a test pfsense box on vm and play with samba on it.. But still curious wtf you installing samba on a firewall for??  For possible reason could you have to run samba on your firewall/gateway box?  Not good security practice that is for sure ;)

I am not seeing any samba packages for pfsense, how are you installing it - what freebsd packages are you installing?  could you post up your smb.conf

Your other quick option would be to just setup lmhost file on your windows os for your pfsense box.  Also what is the length of your pfsense name - there is a limit to netbios names.. 15 or 16 characters I do believe.
« Last Edit: March 27, 2012, 01:20:34 pm by johnpoz »
- An intelligent man is sometimes forced to be drunk to spend time with his fools.
- Have I helped you, want to say thanks?  Donate to pfsense the cost of a beer http://pfsense.org/donate.html

Offline kelsen

  • Sr. Member
  • ****
  • Posts: 495
    • View Profile
Re: DNS doesn't resolve pfsense machine name
« Reply #9 on: March 28, 2012, 01:00:47 pm »
and have you tried \\pfsense-fqdn

Like I said \\pfsensename

would be netbios, and yeah if you do not setup samba to respond to that, then it won't, etc.

I have not played with this in quite some time, but I do believe that nmbd is the daemon that responds to netbios requests.  So is that running?

Guess I could fire up a test pfsense box on vm and play with samba on it.. But still curious wtf you installing samba on a firewall for??  For possible reason could you have to run samba on your firewall/gateway box?  Not good security practice that is for sure ;)

I am not seeing any samba packages for pfsense, how are you installing it - what freebsd packages are you installing?  could you post up your smb.conf

Your other quick option would be to just setup lmhost file on your windows os for your pfsense box.  Also what is the length of your pfsense name - there is a limit to netbios names.. 15 or 16 characters I do believe.

Hi Johnpoz,

     I fould the answer.. Netbios do a broadcast on port UDP 137/138 and i was opening only this ports to firewall lan address unlike to a broadcast address. Now i can access pfsense box trough his netbios name "csmoeste".
     Anyway, still not sure how netbios works and would like some tips about it, if I release the broadcast of these ports, or another way, disabling netbios and using tcp port 445 if it's possible to access trough netbios name, for example.
     If u want to install, u can do pkg_add -rv http://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages/Latest/samba36.tbz.
     I did some modifications on /etc/rc like disabling the rc.conf delete. If u need more instructions..
     For last, i know that is not a good practice install samba on firewall, but i have to do, anyway, it's much more easy install it on a debian..
     Thks.

Offline johnpoz

  • Hero Member
  • *****
  • Posts: 2889
    • View Profile
Re: DNS doesn't resolve pfsense machine name
« Reply #10 on: March 28, 2012, 01:25:33 pm »
Exactly it would be via broadcast ;)  Which default rules for lan would of allowed anyway.  So you must of adjusted these rules?

Thanks for the offer for info, but I have no desire to install samba on my firewall..  And for the life not getting why you say you have to??

You can always add or move files off the box via sftp/scp if required ;)  I find browsing the file structure via a gui handy sometimes sure, I just use sftp - which is only via 1 port and since I use ssh to manage the box anyway its already there.
- An intelligent man is sometimes forced to be drunk to spend time with his fools.
- Have I helped you, want to say thanks?  Donate to pfsense the cost of a beer http://pfsense.org/donate.html

Offline kelsen

  • Sr. Member
  • ****
  • Posts: 495
    • View Profile
Re: DNS doesn't resolve pfsense machine name
« Reply #11 on: March 28, 2012, 01:39:35 pm »
well, u was asking what package.. for test.. anyway, i'm using samba because there is an application that run trough it and i have no other server to use.
I disabled the last rule, so that's was the problem. For now, I dont understand why i need the 137, 138 and 139 port if I dont use Windows nt, 98, 99.. just XP and Seven.

Offline johnpoz

  • Hero Member
  • *****
  • Posts: 2889
    • View Profile
Re: DNS doesn't resolve pfsense machine name
« Reply #12 on: March 28, 2012, 02:26:25 pm »
netbios broadcast for names would use be udp port 137 yes..  So yeah if you want to resolve netbios names via broadcast then the broadcast address and that port would have to be open ;)

xp and 7 still use this port.  This is the name service part of NBT, used for name registration and resolution.

Yes MS awhile back added SMB over TCP which uses 445.  But I am not 100% up to speed how the name resolution works over that, I believe its more dns based using that port.  I don't believe it ever does broadcast over that port for resolution.

I requested info on what package you installed sure, so I could duplicate what you have done if you were still having problems getting it to work.  But I personally don't have any need for it.

I have been out of the windows support arena for a few years now, more just pure networking last few years.  So I am loosing some of my windows based info that use to be right off the top of my head.

And since your working no need for me to install it ;)
- An intelligent man is sometimes forced to be drunk to spend time with his fools.
- Have I helped you, want to say thanks?  Donate to pfsense the cost of a beer http://pfsense.org/donate.html