Re: hostname and dhcp
Lowell Gilbert [EMAIL PROTECTED] writes: Evan Dower [EMAIL PROTECTED] writes: Hmm... That is what I expected it to do, but when I tried it, I ended up with an empty hostname. Of course, I don't remember now if I commented out that line or just set it to empty. Actually, looking at /etc/defaults/rc.conf I see that if I comment it out in /etc/rc.conf it gets set to the empty string in the default, so it shouldn't matter. Anyway, like I said, I tried that and just ended up with an empty hostname. Perhaps that indicates something is wrong with my configuration... Well, I didn't *try* it, I just read through dhclient-script. I'll try to take a closer look. I checked it out on my home network, and found that my DHCP server wasn't sending the hostname back at all. I am running my own DHCP server (using the ISC port), so I configured it to do that (with the get-lease-hostnames option). If you don't run your own server, you can't do anything about that, so if you want your hostname set to the correct FQDN, you'd need to do a reverse lookup on the IP address you found. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
hostname and dhcp
I've actually been running FreeBSD for quite a while now, but I've never known exactly how to handle this. In rc.conf, one must specify a hostname. If you're using DHCP to set up your network though, your FQDN (fully qualified domain name) can change without notice. It seems like a Good Idea to have your hostname be your FQDN, since some things will do a reverse lookup on your IP to verify that it matches the hostname you supplied. In particular I'm thinking of SMTP servers here. (send-pr doesn't work for me because my mail gets rejected.) So, when you're autoconfiguring your network interfaces, what should you put in rc.conf's hostname variable? Is there something else I can do that would allow me to have something nicer looking, but still send my FQDN when asked? Thanks very much, -- Evan Dower Undergraduate, Computer Science University of Washington Public key: http://students.washington.edu/evantd/pgp-pub-key.txt Key fingerprint = D321 FA24 4BDA F82D 53A9 5B27 7D15 5A4F 033F 887D _ Check out the great features of the new MSN 9 Dial-up, with the MSN Dial-up Accelerator. http://click.atdmt.com/AVE/go/onm00200361ave/direct/01/ ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: hostname and dhcp
Evan Dower [EMAIL PROTECTED] writes: I've actually been running FreeBSD for quite a while now, but I've never known exactly how to handle this. In rc.conf, one must specify a hostname. If you're using DHCP to set up your network though, your FQDN (fully qualified domain name) can change without notice. It seems like a Good Idea to have your hostname be your FQDN, since some things will do a reverse lookup on your IP to verify that it matches the hostname you supplied. In particular I'm thinking of SMTP servers here. (send-pr doesn't work for me because my mail gets rejected.) So, when you're autoconfiguring your network interfaces, what should you put in rc.conf's hostname variable? Is there something else I can do that would allow me to have something nicer looking, but still send my FQDN when asked? If you don't set your hostname in rc.conf, dhclient should change it for you when it finds out what it is. -- Lowell Gilbert, embedded/networking software engineer, Boston area: resume/CV at http://be-well.ilk.org:8088/~lowell/resume/ username/password public ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: hostname and dhcp
Hmm... That is what I expected it to do, but when I tried it, I ended up with an empty hostname. Of course, I don't remember now if I commented out that line or just set it to empty. Actually, looking at /etc/defaults/rc.conf I see that if I comment it out in /etc/rc.conf it gets set to the empty string in the default, so it shouldn't matter. Anyway, like I said, I tried that and just ended up with an empty hostname. Perhaps that indicates something is wrong with my configuration... Thanks very much for the help (any other ideas?), -- Evan Dower Undergraduate, Computer Science University of Washington Public key: http://students.washington.edu/evantd/pgp-pub-key.txt Key fingerprint = D321 FA24 4BDA F82D 53A9 5B27 7D15 5A4F 033F 887D From: Lowell Gilbert [EMAIL PROTECTED] To: Evan Dower [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: hostname and dhcp Date: 12 Feb 2004 13:04:38 -0500 Evan Dower [EMAIL PROTECTED] writes: I've actually been running FreeBSD for quite a while now, but I've never known exactly how to handle this. In rc.conf, one must specify a hostname. If you're using DHCP to set up your network though, your FQDN (fully qualified domain name) can change without notice. It seems like a Good Idea to have your hostname be your FQDN, since some things will do a reverse lookup on your IP to verify that it matches the hostname you supplied. In particular I'm thinking of SMTP servers here. (send-pr doesn't work for me because my mail gets rejected.) So, when you're autoconfiguring your network interfaces, what should you put in rc.conf's hostname variable? Is there something else I can do that would allow me to have something nicer looking, but still send my FQDN when asked? If you don't set your hostname in rc.conf, dhclient should change it for you when it finds out what it is. -- Lowell Gilbert, embedded/networking software engineer, Boston area: resume/CV at http://be-well.ilk.org:8088/~lowell/resume/ username/password public _ Check out the great features of the new MSN 9 Dial-up, with the MSN Dial-up Accelerator. http://click.atdmt.com/AVE/go/onm00200361ave/direct/01/ ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
RE: hostname and dhcp
If I understand you correctly, you are talking about your system which is connected to the public internet, and you are using the FBSD built in DHCP client to get an lease from your ISP. Now if you are an commercial user with an officially registered domain name and static ip address from your ISP, Your ISP has you in their DHCP server with your FQDN and it's being sent to your system when you get an new lease. The FBSD built in DHCP client is not configured to accept that info which will auto populate the hostname= environment variable. Install the DHCP package on you system and configure It's client to accept that info. If you are not an commercial user, then the host name the ISP uses for you is meaningless to you. If you have officially registered domain name then use that in your hostname= statement, like this, hostname=cyberbaby.com, then that FQDN will be what sendmail uses for all the users on your LAN. Then use DHCP server to pass the major FQDN to all LAN PC, and those systems will append to the front their system names and tell your DHCP server their full name. If you do not have LAN or officially registered domain name, then all you need, is to meet the domain nameing convention, something.com and you are all set go. IE: hostname=home.FBSDyourLastName.com. As far as reverse lookup goes, that is only on officially registered domain names, either yours, which really happens at the registry hosting your domain name, or at the ISP if your using their email servers. On your system the value you use in hostname= should also be in the /etc/hosts file like this # ::1 localhost localhost.my.domain 127.0.0.1 localhost home.FBSDyourLastName.com FBSDyourLastName.com # Hope this helps Joe -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Evan Dower Sent: Thursday, February 12, 2004 1:15 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: hostname and dhcp Hmm... That is what I expected it to do, but when I tried it, I ended up with an empty hostname. Of course, I don't remember now if I commented out that line or just set it to empty. Actually, looking at /etc/defaults/rc.conf I see that if I comment it out in /etc/rc.conf it gets set to the empty string in the default, so it shouldn't matter. Anyway, like I said, I tried that and just ended up with an empty hostname. Perhaps that indicates something is wrong with my configuration... Thanks very much for the help (any other ideas?), -- Evan Dower Undergraduate, Computer Science University of Washington Public key: http://students.washington.edu/evantd/pgp-pub-key.txt Key fingerprint = D321 FA24 4BDA F82D 53A9 5B27 7D15 5A4F 033F 887D From: Lowell Gilbert [EMAIL PROTECTED] To: Evan Dower [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: hostname and dhcp Date: 12 Feb 2004 13:04:38 -0500 Evan Dower [EMAIL PROTECTED] writes: I've actually been running FreeBSD for quite a while now, but I've never known exactly how to handle this. In rc.conf, one must specify a hostname. If you're using DHCP to set up your network though, your FQDN (fully qualified domain name) can change without notice. It seems like a Good Idea to have your hostname be your FQDN, since some things will do a reverse lookup on your IP to verify that it matches the hostname you supplied. In particular I'm thinking of SMTP servers here. (send-pr doesn't work for me because my mail gets rejected.) So, when you're autoconfiguring your network interfaces, what should you put in rc.conf's hostname variable? Is there something else I can do that would allow me to have something nicer looking, but still send my FQDN when asked? If you don't set your hostname in rc.conf, dhclient should change it for you when it finds out what it is. -- Lowell Gilbert, embedded/networking software engineer, Boston area: resume/CV at http://be-well.ilk.org:8088/~lowell/resume/ username/password public _ Check out the great features of the new MSN 9 Dial-up, with the MSN Dial-up Accelerator. http://click.atdmt.com/AVE/go/onm00200361ave/direct/01/ ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: hostname and dhcp
Evan Dower [EMAIL PROTECTED] writes: Hmm... That is what I expected it to do, but when I tried it, I ended up with an empty hostname. Of course, I don't remember now if I commented out that line or just set it to empty. Actually, looking at /etc/defaults/rc.conf I see that if I comment it out in /etc/rc.conf it gets set to the empty string in the default, so it shouldn't matter. Anyway, like I said, I tried that and just ended up with an empty hostname. Perhaps that indicates something is wrong with my configuration... Well, I didn't *try* it, I just read through dhclient-script. I'll try to take a closer look. Thanks very much for the help (any other ideas?), You could always just create you *own* script (using the dhclient-exit-hooks script, ideally) which sets hostname on the new name unconditionally. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
RE: hostname and dhcp
I guess I just won't worry about it then. It only prevents me from using send-pr (and in fact, I think I still wouldn't be able to use it because I'm pretty sure my smtp server requires me to log in), and every once in a while I have to change it in order for sshd, freenet6, and httpd to start. That part is very odd, actually. I had hostname=lojak.washington.edu but recently things decided they didn't like that, so I changed it to hostname=lojak and then it worked, but when I rebooted a few days later, I had to change it back. Then again, my system seems to have a number of unusual and inexplicable quirks. Thanks for all your help, (now if I could only get cdparanoia working again...) -- Evan Dower Undergraduate, Computer Science University of Washington Public key: http://students.washington.edu/evantd/pgp-pub-key.txt Key fingerprint = D321 FA24 4BDA F82D 53A9 5B27 7D15 5A4F 033F 887D From: JJB [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: Evan Dower [EMAIL PROTECTED],[EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: RE: hostname and dhcp Date: Thu, 12 Feb 2004 14:20:55 -0500 If I understand you correctly, you are talking about your system which is connected to the public internet, and you are using the FBSD built in DHCP client to get an lease from your ISP. Now if you are an commercial user with an officially registered domain name and static ip address from your ISP, Your ISP has you in their DHCP server with your FQDN and it's being sent to your system when you get an new lease. The FBSD built in DHCP client is not configured to accept that info which will auto populate the hostname= environment variable. Install the DHCP package on you system and configure It's client to accept that info. If you are not an commercial user, then the host name the ISP uses for you is meaningless to you. If you have officially registered domain name then use that in your hostname= statement, like this, hostname=cyberbaby.com, then that FQDN will be what sendmail uses for all the users on your LAN. Then use DHCP server to pass the major FQDN to all LAN PC, and those systems will append to the front their system names and tell your DHCP server their full name. If you do not have LAN or officially registered domain name, then all you need, is to meet the domain nameing convention, something.com and you are all set go. IE: hostname=home.FBSDyourLastName.com. As far as reverse lookup goes, that is only on officially registered domain names, either yours, which really happens at the registry hosting your domain name, or at the ISP if your using their email servers. On your system the value you use in hostname= should also be in the /etc/hosts file like this # ::1 localhost localhost.my.domain 127.0.0.1 localhost home.FBSDyourLastName.com FBSDyourLastName.com # Hope this helps Joe -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Evan Dower Sent: Thursday, February 12, 2004 1:15 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: hostname and dhcp Hmm... That is what I expected it to do, but when I tried it, I ended up with an empty hostname. Of course, I don't remember now if I commented out that line or just set it to empty. Actually, looking at /etc/defaults/rc.conf I see that if I comment it out in /etc/rc.conf it gets set to the empty string in the default, so it shouldn't matter. Anyway, like I said, I tried that and just ended up with an empty hostname. Perhaps that indicates something is wrong with my configuration... Thanks very much for the help (any other ideas?), -- Evan Dower Undergraduate, Computer Science University of Washington Public key: http://students.washington.edu/evantd/pgp-pub-key.txt Key fingerprint = D321 FA24 4BDA F82D 53A9 5B27 7D15 5A4F 033F 887D From: Lowell Gilbert [EMAIL PROTECTED] To: Evan Dower [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: hostname and dhcp Date: 12 Feb 2004 13:04:38 -0500 Evan Dower [EMAIL PROTECTED] writes: I've actually been running FreeBSD for quite a while now, but I've never known exactly how to handle this. In rc.conf, one must specify a hostname. If you're using DHCP to set up your network though, your FQDN (fully qualified domain name) can change without notice. It seems like a Good Idea to have your hostname be your FQDN, since some things will do a reverse lookup on your IP to verify that it matches the hostname you supplied. In particular I'm thinking of SMTP servers here. (send-pr doesn't work for me because my mail gets rejected.) So, when you're autoconfiguring your network interfaces, what should you put in rc.conf's hostname variable? Is there something else I can do that would allow me to have something nicer looking, but still send my FQDN when asked? If you don't set your hostname in rc.conf, dhclient should change it for you when it finds out what it is. -- Lowell Gilbert, embedded/networking software engineer