#!/bin/bash
# restore-default.sh
# Revert VPN, iptables, and routing changes

echo "Stopping OpenVPN..."
sudo pkill openvpn

echo "Flushing VPN routing table..."
sudo ip route flush table vpn

echo "Flushing iptables marks..."
sudo iptables -t mangle -F OUTPUT

echo "Removing static route to your PC / No-IP hostname..."
# Replace with the IP you added earlier
sudo ip route del 81.182.99.68 via 192.168.1.1 dev wlp73s0 2>/dev/null

echo "Removing policy routing rule..."
sudo ip rule del fwmark 1 table vpn 2>/dev/null

echo "Done. Your server should now use normal ISP routes."
