helper tools for configuring a host system to allow usb armory to access the internet
This commit is contained in:
parent
b46e72dba3
commit
e86ada4297
2 changed files with 26 additions and 0 deletions
12
tools/armory_demasq
Executable file
12
tools/armory_demasq
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
set -v
|
||||||
|
USB_INTERFACE=enp0s20u3
|
||||||
|
INTERNET_INTERFACE=wlp3s0
|
||||||
|
|
||||||
|
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
|
||||||
|
|
14
tools/armory_masq
Executable file
14
tools/armory_masq
Executable file
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
set -v
|
||||||
|
USB_INTERFACE=enp0s20u3
|
||||||
|
INTERNET_INTERFACE=wlp3s0
|
||||||
|
|
||||||
|
sudo /sbin/ip link set $USB_INTERFACE up
|
||||||
|
|
||||||
|
sudo /sbin/ip addr add 10.0.0.2/24 dev $USB_INTERFACE
|
||||||
|
|
||||||
|
sudo /sbin/iptables -t nat -A POSTROUTING -s 10.0.0.1/32 -o $INTERNET_INTERFACE -j MASQUERADE
|
||||||
|
|
||||||
|
echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward
|
||||||
|
|
Loading…
Reference in a new issue