#!/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
