File tree 1 file changed +6
-3
lines changed 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ setup_dsnmasq(){
102
102
hostName=$( hostname)
103
103
pr_info " writing Dnsmasq conf on $DNSMASQ_CONF "
104
104
cat << EOF > /etc/dnsmasq.d/crc-dnsmasq.conf
105
- listen-address=$IIP
105
+ listen-address=0.0.0.0
106
106
expand-hosts
107
107
log-queries
108
108
local=/crc.testing/
@@ -111,16 +111,19 @@ address=/apps-crc.testing/$IIP
111
111
address=/api.crc.testing/$IIP
112
112
address=/api-int.crc.testing/$IIP
113
113
address=/$hostName .crc.testing/192.168.126.11
114
+ address=/$EIP .nip.io/$IIP
114
115
EOF
115
116
116
117
stop_if_failed $? " failed to write Dnsmasq configuration in $DNSMASQ_CONF "
117
118
pr_info " adding Dnsmasq as primary DNS"
118
119
sleep 2
119
- nmcli connection modify Wired\ connection\ 1 ipv4.dns " $IIP ,169.254.169.254"
120
+ CURRENT_NAMESERVERS=$( grep " nameserver" /etc/resolv.conf | awk ' {print $2}' | xargs | sed ' s/ /,/g' )
121
+ nmcli connection modify " Wired connection 1" ipv4.dns " $IIP ,$CURRENT_NAMESERVERS "
122
+ nmcli connection up " Wired connection 1"
120
123
stop_if_failed $? " failed to modify NetworkManager settings"
121
124
pr_info " restarting NetworkManager"
122
125
sleep 2
123
- systemctl restart NetworkManager
126
+ systemctl restart NetworkManager
124
127
stop_if_failed $? " failed to restart NetworkManager"
125
128
pr_info " enabling & starting Dnsmasq service"
126
129
systemctl enable dnsmasq.service
You can’t perform that action at this time.
0 commit comments