diff --git a/deployments/free5gc/upf-iptables.sh b/deployments/free5gc/upf-iptables.sh new file mode 100755 index 0000000..94c763f --- /dev/null +++ b/deployments/free5gc/upf-iptables.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +iptables -t filter -F +iptables -t nat -F +iptables -t mangle -F + +iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE + +iptables -A FORWARD -i uesimtun0 -o eth0 -j ACCEPT +iptables -A FORWARD -i eth0 -o uesimtun0 -m state --state RELATED,ESTABLISHED -j ACCEPT + +echo "UPF iptables rules configured"