3 ms·
Want to know a really cursed dirty little magic trick? (as root:) ip route add table local local 8.8.8.8/32 dev lo echo 1 > /proc/sys/net/ipv4/ip_nonlocal
by eqvinox 5mo ago
Want to know a really cursed dirty little magic trick?
(as root:)
ip route add table local local 8.8.8.8/32 dev lo
echo 1 > /proc/sys/net/ipv4/ip_nonlocal_bind
cat <<EOF >/etc/unbound/unbound.conf.d/steal-8.8.8.8.conf
server:
interface: 8.8.8.8
EOF
service unbound restart
(before anyone asks: you don't just go add 8.8.8.8/32 as an address on lo because then that's a valid source address the system might use to send traffic out. Not having it as an actual address is the point of this trickery. Also this will work with most DNS caches, doesn't need to be unbound.)
And to be clear: I said "cursed dirty" and I mean "cursed dirty".
- justsomehnguy 5mo agoYikes. Container resolving is still broken though.
- eqvinox 5mo agoNot if your containers are L3 routed through the host ;) (Or did you mean resolving the names of the containers? That'd be handled through unbound-control local_data)