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
912fc6b739
commit
6a06a276f4
@ -26,7 +26,7 @@ for lan_network_item in "${lan_network_list[@]}"; do
|
|||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "[info] ip route defined as follows..."
|
echo "[info] ip route defined as follows..." | ts '%Y-%m-%d %H:%M:%.S'
|
||||||
echo "--------------------"
|
echo "--------------------"
|
||||||
ip route
|
ip route
|
||||||
echo "--------------------"
|
echo "--------------------"
|
||||||
@ -44,7 +44,7 @@ iptable_mangle_exit_code=$?
|
|||||||
|
|
||||||
if [[ $iptable_mangle_exit_code == 0 ]]; then
|
if [[ $iptable_mangle_exit_code == 0 ]]; then
|
||||||
|
|
||||||
echo "[info] iptable_mangle support detected, adding fwmark for tables"
|
echo "[info] iptable_mangle support detected, adding fwmark for tables" | ts '%Y-%m-%d %H:%M:%.S'
|
||||||
|
|
||||||
# setup route for deluge webui using set-mark to route traffic for port 8112 to eth0
|
# setup route for deluge webui using set-mark to route traffic for port 8112 to eth0
|
||||||
echo "8080 webui" >> /etc/iproute2/rt_tables
|
echo "8080 webui" >> /etc/iproute2/rt_tables
|
||||||
@ -73,7 +73,7 @@ fi
|
|||||||
|
|
||||||
# convert netmask into cidr format
|
# convert netmask into cidr format
|
||||||
docker_network_cidr=$(ipcalc "${docker_ip}" "${docker_mask}" | grep -P -o -m 1 "(?<=Network:)\s+[^\s]+")
|
docker_network_cidr=$(ipcalc "${docker_ip}" "${docker_mask}" | grep -P -o -m 1 "(?<=Network:)\s+[^\s]+")
|
||||||
echo "[info] Docker network defined as ${docker_network_cidr}"
|
echo "[info] Docker network defined as ${docker_network_cidr}" | ts '%Y-%m-%d %H:%M:%.S'
|
||||||
|
|
||||||
# input iptable rules
|
# input iptable rules
|
||||||
###
|
###
|
||||||
@ -162,7 +162,7 @@ iptables -A OUTPUT -p icmp --icmp-type echo-request -j ACCEPT
|
|||||||
# accept output from local loopback adapter
|
# accept output from local loopback adapter
|
||||||
iptables -A OUTPUT -o lo -j ACCEPT
|
iptables -A OUTPUT -o lo -j ACCEPT
|
||||||
|
|
||||||
echo "[info] iptables defined as follows..."
|
echo "[info] iptables defined as follows..." | ts '%Y-%m-%d %H:%M:%.S'
|
||||||
echo "--------------------"
|
echo "--------------------"
|
||||||
iptables -S
|
iptables -S
|
||||||
echo "--------------------"
|
echo "--------------------"
|
||||||
|
Loading…
Reference in New Issue
Block a user