How can I configure isc-dhcp-client differently according to the chosen logical interface?
0
votes
1
answer
142
views
I am using debian
ifupdown
’s mappings, with guessnet
, to connect to the “right” WiFi network wherever I am. Here is an excerpt of my /etc/network/interface
:
mapping wlp2s0
script /usr/sbin/guessnet-ifupdown
map autofilter: true
map default: wlp2s0-default
iface wlp2s0-tgv-inoui inet dhcp
guessnet test wireless essid _SNCF_WIFI_INOUI
wpa-conf /etc/wpa_supplicant/wpa_supplicant_minimal.conf
wpa-driver nl80211,wext
wpa-ssid _SNCF_WIFI_INOUI
wpa-key-mgmt NONE
openvpn home_client
I also use unbound
as a local caching DNS resolver.
When I am connected to the _SNCF_WIFI_INOUI
WiFi network, I’d like to forward DNS requests for the sncf.
zones to the resolver provided by the DHCP server, since it provides different answers from the public servers (which I need to get the information specific to the train I am traveling in).
As far as I know, isc-dhcp-client
uses hooks that can be called when it gets answers for the DHCP server. I guess I could write one to configure unbound
as needed.
But how can I ensure this only happens for the wlp2s0-tgv-inoui
logical interface? Is there a way I can get the logical interface when running the hook?
Asked by user2233709
(1709 rep)
Jul 30, 2024, 12:08 PM
Last activity: Aug 8, 2024, 09:10 AM
Last activity: Aug 8, 2024, 09:10 AM