Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Animal Chin

#1
General Discussion / DNS hostnames from DHCP
November 07, 2019, 04:52:31 AM
This is apparently not a new topic as I found some of others here and on the "other" sites which seemed to go nowhere.  I have a bunch of IOT devices and many of them have a hard-coded hostname - like something-last 6 of the mac.  It's ugly.  All of my Sonos Ones are named SonosZP.  Sonos appears to not allow name changes either.

So all I want to do is set up DHCP to match on a MAC and publish the hostname I define into DNS.  The GUI for Unbound (which I'm using) and Dnsmasq both have options for "Register DHCP leases" and "Register DHCP static Mappings".  And in DHCP, if you add a static mapping, beneath the IP address field it reads "If no IPv4 address is given, one will be dynamically allocated from the pool".  Great!

So I take that to mean if I create a static mapping in DHCP only adding in the MAC and hostname, so long as I have the DNS boxes checked I should be able to resolve my "custom" hostnames.

But I can't.  I screwed around for a while with the unbound.conf file and noticed when unchecking the "Register DHCP leases" box the directive "include: /var/unbound/dhcpleases.conf" is removed.  But toggling the "Register DHCP static mappings" box neither writes nor removed a directive from unbound.conf.  Perhaps it writes something elsewhere.

I can't see a way to accomplish this without creating a bunch of manual mappings with IP's, which nearly destroys the utility of DHCP.  Any solutions out there?  I've also tried Dmsmasq and DNSCrypt in all combinations but no dice.  FWIW, the "register dhcp leases" checkbox does register the garbage hostnames and they are reachable, so I got that going for me, I guess.

I also noted in the "other" sites there is a "dhcpleases_entries.conf" that OPN doesn't seem to reference.  Or maybe I didn't find it.  IDK at this point... I'm getting sleepy....

Thanks
#2
@hbc thanks for the tip.  I'll give it a go
#3
Thanks for the reply.  So I have a grandfathered StrongVPN account that was called VPN Lite back in the day.  It only offered PPTP nad L2TP/IPSec (I never used the PPTP part).  Unfortunately to add OpenVPN to the account takes me to a current plan, costing more, and I'm a cheap bastard.

So if it can be done with IPSec then great.  If I have to go to OpenVPN then i'll have to explore other providers because it opens up the choices.

Thanks
#4
So I'm new to OpnSense but not networks.  I'm tearing out an old ASA firewall at my home and replacing it with the current OpnSense release.  I like the software a lot, but for the life of me I cannot figure out how to set up an IPSec VPN client.  Plenty of tutorials on how to make it a VPN server.

My goal is to make it so some hosts in the house (I work from home) exit direct to my ISP, and other hosts exit via my IPSec VPN account.  The routing for this is still to be nailed down but I can't even get to that point yet.

I was able to get as far as getting the link to establish (i think) by reviewing the ipsec.log.  At least it showed it negotiated after fiddling with the DH key group.  But on the dashboard it never shows the tunnel up, no matter if I set it to start immediate or on traffic.

I'm hoping there are others that have tried this before me with success.

Thanks