From 225332b9775ade2bc6d0b739e5147ad3f3f976b8 Mon Sep 17 00:00:00 2001 From: Adam Hill Date: Sat, 21 Apr 2018 12:42:13 -0500 Subject: [PATCH 1/2] fix_ipv6_lookup Forgot to add the lookup fix from https://github.com/diginc/docker-pi-hole/issues/199#issuecomment-372462890 --- docker_run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker_run.sh b/docker_run.sh index 7d545b8..58b8388 100755 --- a/docker_run.sh +++ b/docker_run.sh @@ -1,6 +1,6 @@ #!/bin/bash IP_LOOKUP="$(ip route get 8.8.8.8 | awk '{ print $NF; exit }')" # May not work for VPN / tun0 -IPv6_LOOKUP="$(ip -6 route get 2001:4860:4860::8888 | awk '{ print $10; exit }')" # May not work for VPN / tun0 +IPv6_LOOKUP="$(ip -6 route get 2001:4860:4860::8888 | awk '{for(i=1;i<=NF;i++) if ($i=="src") print $(i+1)}')" # May not work for VPN / tun0 IP="${IP:-$IP_LOOKUP}" # use $IP, if set, otherwise IP_LOOKUP IPv6="${IPv6:-$IPv6_LOOKUP}" # use $IPv6, if set, otherwise IP_LOOKUP DOCKER_CONFIGS="$(pwd)" # Default of directory you run this from, update to where ever. From aaad7c89810f9a64beeeb9599ba5218e349be7d9 Mon Sep 17 00:00:00 2001 From: Adam Hill Date: Sat, 21 Apr 2018 12:47:22 -0500 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8ba5678..3ca6ae8 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ One crucial thing to know before starting is this container needs port 53 and po ``` IP_LOOKUP="$(ip route get 8.8.8.8 | awk '{ print $NF; exit }')" # May not work for VPN / tun0 -IPv6_LOOKUP="$(ip -6 route get 2001:4860:4860::8888 | awk '{ print $10; exit }')" # May not work for VPN / tun0 +IPv6_LOOKUP="$(ip -6 route get 2001:4860:4860::8888 | awk '{for(i=1;i<=NF;i++) if ($i=="src") print $(i+1)}')" # May not work for VPN / tun0 IP="${IP:-$IP_LOOKUP}" # use $IP, if set, otherwise IP_LOOKUP IPv6="${IPv6:-$IPv6_LOOKUP}" # use $IPv6, if set, otherwise IP_LOOKUP DOCKER_CONFIGS="$(pwd)" # Default of directory you run this from, update to where ever.