Re: How to get Fedora 35 to use DNS name as hostname?
by Petr Menšík
On 1/17/22 11:27, Tim via users wrote:
> On Mon, 2022-01-17 at 08:42 +0100, Peter Boy wrote:
>> The default configuration rather follows the opposite principle. The
>> hostname should be well defined and independent of changing IP
>> addresses.
> I sort-of go along with that. If you've set a hostname, there's sense
> in it not getting changed. On the other hand, if you use a DHCP server
> to centrally manage the allocation of addresses, you might also want it
> (or your DNS server) to control hostnames. I do. Some devices on my
> network obey naming instructions from the DHCP &/or DNS servers, others
> ignore it.
>
I think it might make more sense to correctly detect hostname during
installation. If you define hostname on installation from network, it
should be kept. I expect it should keep the same hostname during
reboots. I think only diskless terminals may want always obtaining
hostname on every boot. Anything storing state on local disk should want
to keep its name.
I think more tight integration with libvirt names would be useful. I
admit I know little of that. I usually define name AFTER installation
for my VMs, which would not work with what I propose. I would like easy
way to set hostname from libvirt during installation. I don't need
always fixed IP, but I want fixed DNS name for given VM. I expect that
is common requirement.
dnsmasq from libvirt would provide hostname to machine in case it has
static lease for given DUID/hwaddr. Is there tool to create static lease
from machine name on VM creation? For example libvirt can detect name of
distribution from ISO image. It would be nice if it could propagate it
forward.
I am afraid I did not help much.
Regards,
Petr
--
Petr Menšík
Software Engineer
Red Hat, http://www.redhat.com/
email: pemensik(a)redhat.com
PGP: DFCF908DB7C87E8E529925BC4931CA5B6C9FC5CB
2 years, 4 months
Re: Help configuring internal network
by Patrick O'Callaghan
On Sun, 2022-03-20 at 08:50 -0400, Jonathan Billings wrote:
> On Mar 20, 2022, at 04:17, Tim via users
> <users(a)lists.fedoraproject.org> wrote:
> >
> > When has the /etc/hosts file ever given anything an IP address?
>
> I don’t know the exact details of this particular problem, but if you
> install the “dnsmasq” package, it includes dns and dhcp service, and
> by default it parses /etc/hosts and uses it for DNS names.
I think Tim's point is that the /etc/hosts file doesn't *assign* IP
addresses, it merely *records* them.
poc
2 years, 2 months
Re: ssh impacted by systemd.resolved
by Tom Horsley
On Mon, 18 Apr 2022 23:43:36 -0400
Sam Varshavchik wrote:
> Help me out here: wasn't there a point of order made, way back when: hey, if
> you want to disable systemd-resolved, just manually replace the
> /etc/resolv.conf symlink?
You also need to systemctl disable systemd-resolved (and probably
systemctl mask systemd-resolved). That way it doesn't update anything
at all. That's how I'm currently set and everyone is happily using
the dnsmasq I have installed to serve my local lan.
Systemd didn't invent replacing resolv.conf, various dhcp client
shofware have done that for years (and it was just as irritating when
they did it).
2 years, 1 month
Re: ssh impacted by systemd.resolved
by Petr Menšík
systemd-resolved can also be just uninstalled. Provides at least very
basic symlink removal.
On 4/19/22 14:27, Tom Horsley wrote:
> On Mon, 18 Apr 2022 23:43:36 -0400
> Sam Varshavchik wrote:
>
>> Help me out here: wasn't there a point of order made, way back when: hey, if
>> you want to disable systemd-resolved, just manually replace the
>> /etc/resolv.conf symlink?
> You also need to systemctl disable systemd-resolved (and probably
> systemctl mask systemd-resolved). That way it doesn't update anything
> at all. That's how I'm currently set and everyone is happily using
> the dnsmasq I have installed to serve my local lan.
I think the major problem is with upgrades from previous versions of
Fedora, where nothing similar were required. systemd-resolved just
grabbed /etc/resolv.conf and made many other dhcp clients unable to get
it back. They also don't offer simple way to disable resolved and keep
DNS working.
>
> Systemd didn't invent replacing resolv.conf, various dhcp client
> shofware have done that for years (and it was just as irritating when
> they did it).
systemd invented replacing /etc/resolv.conf with symlink leading to a
private /run directory. No other software did that automatically AFAIK.
If you disable systemd-resolved later, it would stay broken. Other
clients just overwritten the contents of /etc/resolv.conf. A common
trick is using chattr +i /etc/resolv.conf when you want to prevent
random rewrites.
When it should reconfigure system name resolution, it has to use some
way. Current resolvconf from systemd-resolved package is useless without
systemd-resolved enabled. I don't know about any better generic
interface to configure system nameservers.
--
Petr Menšík
Software Engineer
Red Hat, http://www.redhat.com/
email: pemensik(a)redhat.com
PGP: DFCF908DB7C87E8E529925BC4931CA5B6C9FC5CB
2 years, 1 month
1 line null webserver
by Mike Wright
Hi all,
I'm using dnsmasq to create an ad/media blocker. Whenever it receives a
request for any listed domain I want to return a specific IP that points
to a dummy webserver. That part works.
It's the dummy webserver that has me stumped. I'd like it to return 0
bytes, status 200 for every connection to port 80.
nc seems like a good candidate but I can't get it right.
Anybody have a nc one-liner or other alternative that would accomplish this?
Thanks for any ideas,
Mike Wright
1 year, 6 months
Re: 1 line null webserver
by Tim
On Sat, 2022-12-03 at 13:40 -0800, Mike Wright wrote:
> I'm using dnsmasq to create an ad/media blocker. Whenever it receives a
> request for any listed domain I want to return a specific IP that points
> to a dummy webserver. That part works.
>
> It's the dummy webserver that has me stumped. I'd like it to return 0
> bytes, status 200 for every connection to port 80.
I took the approach (using BIND) to return a null result (domain
doesn't exist) for banned advert sources.
--
uname -rsvp
Linux 3.10.0-1160.80.1.el7.x86_64 #1 SMP Tue Nov 8 15:48:59 UTC 2022 x86_64
Boilerplate: All unexpected mail to my mailbox is automatically deleted.
I will only get to see the messages that are posted to the mailing list.
1 year, 6 months
Re: 1 line null webserver
by Philip Rhoades
Mike,
ruby -run -e httpd . -p 5000
P.
On 2022-12-04 21:01, Barry wrote:
>> On 3 Dec 2022, at 21:40, Mike Wright <nobody(a)nospam.hostisimo.com>
>> wrote:
>>
>> Hi all,
>>
>> I'm using dnsmasq to create an ad/media blocker. Whenever it receives
>> a request for any listed domain I want to return a specific IP that
>> points to a dummy webserver. That part works.
>>
>> It's the dummy webserver that has me stumped. I'd like it to return 0
>> bytes, status 200 for every connection to port 80.
>>
>> nc seems like a good candidate but I can't get it right.
>>
>> Anybody have a nc one-liner or other alternative that would accomplish
>> this?
>
> I Use apache httpd, its very low over head to serve static content.
> From memory I recall it used approx. 100k bytes of memory.
>
> Barry
>>
>> Thanks for any ideas,
>> Mike Wright
>> _______________________________________________
>> users mailing list -- users(a)lists.fedoraproject.org
>> To unsubscribe send an email to users-leave(a)lists.fedoraproject.org
>> Fedora Code of Conduct:
>> https://docs.fedoraproject.org/en-US/project/code-of-conduct/
>> List Guidelines:
>> https://fedoraproject.org/wiki/Mailing_list_guidelines
>> List Archives:
>> https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
>> Do not reply to spam, report it:
>> https://pagure.io/fedora-infrastructure/new_issue
> _______________________________________________
> users mailing list -- users(a)lists.fedoraproject.org
> To unsubscribe send an email to users-leave(a)lists.fedoraproject.org
> Fedora Code of Conduct:
> https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives:
> https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
> Do not reply to spam, report it:
> https://pagure.io/fedora-infrastructure/new_issue
--
Philip Rhoades
PO Box 896
Cowra NSW 2794
Australia
E-mail: phil(a)pricom.com.au
1 year, 5 months
Re: 1 line null webserver
by Ted Roche
On Sat, Dec 3, 2022 at 4:41 PM Mike Wright <nobody(a)nospam.hostisimo.com> wrote:
>
> Anybody have a nc one-liner or other alternative that would accomplish this?
>
Some of my best projects started out as a one-liner. ;)
I'm using Pihole now. It acts as a DNS and returns 0.0.0.0 as the
address . What if you set dnsmasq to do this with no web server
needed?
1 year, 5 months
Re: Clearing DNS cache without rebooting
by Tom Horsley
On Fri, 9 Dec 2022 12:47:14 -0700
Joe Zeff wrote:
> Suggestions?
I've been there, the main problem is there are something like a dozen
different services which may or may not be cacheing DNS information, and
you have to figure out which ones are running and lookup how to make
that one clear its cache, then do the same for all the others.
nscd, systemd-resolved, dnsmasq, bind are just the ones I've run
into before that I can remember, I think there are others as well.
1 year, 5 months