From 2f1837a75e96612040c6db2b594adf7463173c88 Mon Sep 17 00:00:00 2001 From: Loïc Guégan Date: Tue, 1 Apr 2025 17:56:32 +0200 Subject: Cleaning repository --- scripts/network_host.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 scripts/network_host.sh (limited to 'scripts/network_host.sh') diff --git a/scripts/network_host.sh b/scripts/network_host.sh new file mode 100644 index 0000000..d48b90b --- /dev/null +++ b/scripts/network_host.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Config +INTERNET_INTERFACE="wlp0s20f3" +BEAGLEBONE_INTERFACE="enp0s20f0u4u4u2" + +# Setup +iptables -F +iptables -t nat -A POSTROUTING -o ${INTERNET_INTERFACE} -j MASQUERADE +iptables -A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT +iptables -A FORWARD -i ${BEAGLEBONE_INTERFACE} -o ${INTERNET_INTERFACE} -j ACCEPT -- cgit v1.2.3