core-agent-linux/vm-systemd/network-proxy-stop.sh
Marek Marczykowski-Górecki 0caa7fcf75
network: stop IP forwarding before disabling firewall
Stop IP forwarding when stopping qubes-network service (which initially
enables it). This makes ordering against qubes-firewall safe - firewall
is applied before allowing IP forward and then is removed when IP
forward is already disabled.

Fixes QubesOS/qubes-issues#5599
2020-12-03 20:52:51 +01:00

8 lines
211 B
Bash
Executable File

#!/bin/sh
echo 0 > /proc/sys/net/ipv4/ip_forward
# disable also IPv6 forwarding, if IPv6 applicable
if [ -w /proc/sys/net/ipv6/conf/all/forwarding ]; then
echo 0 > /proc/sys/net/ipv6/conf/all/forwarding
fi