mirror of
https://github.com/MarkusMcNugen/docker-qBittorrentvpn
synced 2024-11-14 22:55:11 +00:00
Update iptables.sh
This commit is contained in:
parent
680718db27
commit
088931e9b7
@ -70,13 +70,13 @@ if [[ "${DEBUG}" == "true" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# identify ip for docker bridge interface
|
# identify ip for docker bridge interface
|
||||||
docker_ip=$(ifconfig "${docker_interface}" | grep -P -o -m 1 '(?<=inet\saddr:)[^\s]+')
|
docker_ip=$(ifconfig "${docker_interface}" | grep -o "inet [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | grep -o "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*")
|
||||||
if [[ "${DEBUG}" == "true" ]]; then
|
if [[ "${DEBUG}" == "true" ]]; then
|
||||||
echo "[debug] Docker IP defined as ${docker_ip}"
|
echo "[debug] Docker IP defined as ${docker_ip}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# identify netmask for docker bridge interface
|
# identify netmask for docker bridge interface
|
||||||
docker_mask=$(ifconfig "${docker_interface}" | grep -P -o -m 1 '(?<=Mask:)[^\s]+')
|
docker_mask=$(ifconfig "${docker_interface}" | grep -o "netmask [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | grep -o "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*")
|
||||||
if [[ "${DEBUG}" == "true" ]]; then
|
if [[ "${DEBUG}" == "true" ]]; then
|
||||||
echo "[debug] Docker netmask defined as ${docker_mask}"
|
echo "[debug] Docker netmask defined as ${docker_mask}"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user