dotfiles/tools/armory_demasq

17 lines
309 B
Bash
Executable file

#!/bin/bash
set -e
set -v
if [[ -z "$USB_INTERFACE" ]]; then
USB_INTERFACE=usb0
fi
if [[ -z "$INTERNET_INTERFACE" ]]; then
INTERNET_INTERFACE=wlan0
fi
echo 0 | sudo tee /proc/sys/net/ipv4/ip_forward
sudo /sbin/ip addr del 10.0.0.2/24 dev $USB_INTERFACE
sudo /sbin/ip link set $USB_INTERFACE down