File tree 1 file changed +11
-3
lines changed
1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -8,19 +8,27 @@ if [[ ${CRC_NETWORK_MODE_USER} -eq 1 ]]; then
8
8
fi
9
9
10
10
hostName=$( hostname)
11
- hostIp=$( hostname --all-ip-addresses | awk ' {print $1}' )
11
+ hostIp=$( ip -4 addr show dev br-ex | grep ' inet ' | cut -d/ -f1 | awk ' {print $2}' )
12
+
13
+ echo " ${hostIp} " | grep -E " ([0-9]{1,3}[\\ .]){3}[0-9]{1,3}"
14
+
15
+ if [[ " $? " -ne 0 ]]; then
16
+ echo -n " IP address of br-ex not found"
17
+ exit 1
18
+ fi
12
19
13
20
cat << EOF > /etc/dnsmasq.d/crc-dnsmasq.conf
14
- listen-address=$hostIp
21
+ listen-address=br-ex
15
22
expand-hosts
16
23
log-queries
17
24
local=/crc.testing/
18
25
domain=crc.testing
19
26
address=/${APPS_DOMAIN} /$hostIp
20
27
address=/api.crc.testing/$hostIp
21
28
address=/api-int.crc.testing/$hostIp
22
- address=/$hostName .crc.testing/$hostIp
29
+ address=/$hostName .crc.testing/192.168.126.11
23
30
EOF
24
31
25
32
/bin/systemctl enable --now dnsmasq.service
26
33
/bin/nmcli conn modify --temporary ovs-if-br-ex ipv4.dns $hostIp ,1.1.1.1
34
+
You can’t perform that action at this time.
0 commit comments