mirror of
https://gitlab.com/manzerbredes/ina260-beaglebone-performance.git
synced 2025-07-01 10:57:40 +00:00
Cleaning repository
This commit is contained in:
commit
2f1837a75e
26 changed files with 628 additions and 0 deletions
13
scripts/network_beaglebone.sh
Normal file
13
scripts/network_beaglebone.sh
Normal file
|
@ -0,0 +1,13 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Config
|
||||
NAMESERVER="162.19.75.102"
|
||||
|
||||
# Setup
|
||||
ifconfig eth0 down
|
||||
ifconfig usb1 down
|
||||
ifconfig usb0 10.0.0.2/24
|
||||
iptables -F
|
||||
ip route del default
|
||||
ip route add default via 10.0.0.1 dev usb0
|
||||
echo "nameserver ${NAMESERVER}" > /etc/resolv.conf
|
11
scripts/network_host.sh
Normal file
11
scripts/network_host.sh
Normal file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue