Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| documentation:firewall [2022-09-20 17:06] – created Anton Tetov Johansson | documentation:firewall [2022-09-30 14:24] (current) – Anton Tetov Johansson | ||
|---|---|---|---|
| Line 9: | Line 9: | ||
| * '' | * '' | ||
| - | To access nodes behind athans you will need to [[tutorials: | + | To access nodes behind athans you will need to [[tutorials: |
| + | |||
| + | You will also need a wired connection to Automatic Control' | ||
| + | |||
| + | Robots are configured for all 4 subnets but usually only connected to one. Test pinging them to figure out if it's A, B, C or D. | ||
| + | |||
| + | === Scripts === | ||
| + | |||
| + | == Windows == | ||
| + | |||
| + | TODO: Test! | ||
| + | |||
| + | <file DOS athans_routes.bat> | ||
| + | for /l %%i in (65, 1, 68) do ( | ||
| + | route -p ADD 192.168.%%i.0 MASK 255.255.255.0 130.235.83.152 | ||
| + | ) | ||
| + | </ | ||
| + | |||
| + | == Mac == | ||
| + | |||
| + | TODO: Test! | ||
| + | |||
| + | Run script using '' | ||
| + | |||
| + | <file zsh athans_routes_mac.sh> | ||
| + | # | ||
| + | |||
| + | GATEWAY=130.235.83.152 | ||
| + | |||
| + | for i in {65..68} ; do | ||
| + | SUBNET=" | ||
| + | route -n add -net " | ||
| + | done | ||
| + | </ | ||
| + | |||
| + | == Linux == | ||
| + | |||
| + | = '' | ||
| + | |||
| + | Not persistent! | ||
| + | |||
| + | Find name of device using '' | ||
| + | |||
| + | Run script using '' | ||
| + | |||
| + | <file bash athans_routes_linux_ip_route.sh> | ||
| + | # | ||
| + | |||
| + | GATEWAY=130.235.83.152 | ||
| + | DEVICE=$1 | ||
| + | |||
| + | for i in {65..68} ; do | ||
| + | SUBNET=" | ||
| + | ip route add $SUBNET via $GATEWAY dev $DEVICE | ||
| + | done | ||
| + | </ | ||
| + | |||
| + | = nmcli = | ||
| + | |||
| + | Find name of device using '' | ||
| + | |||
| + | Run script using '' | ||
| + | |||
| + | <file bash athans_routes_linux_nmcli.sh> | ||
| + | # | ||
| + | |||
| + | GATEWAY=130.235.83.152 | ||
| + | CONNECTION=$1 | ||
| + | |||
| + | for i in {65..68} ; do | ||
| + | SUBNET=" | ||
| + | nmcli connection modify “$CONNECTION” +ipv4.routes “$SUBNET $GATEWAY” | ||
| + | done | ||
| + | </ | ||
| + | |||
| + | = netplan = | ||
| + | |||
| + | Find name of device using '' | ||
| + | |||
| + | Put file into ''/ | ||
| + | |||
| + | <file yaml athans_routes.yaml> | ||
| + | network: | ||
| + | version: 2 | ||
| + | ethernets: | ||
| + | enpXsY: | ||
| + | routes: | ||
| + | - to: 192.168.65.0/ | ||
| + | via: 130.235.83.152 | ||
| + | - to: 192.168.66.0/ | ||
| + | via: 130.235.83.152 | ||
| + | - to: 192.168.67.0/ | ||
| + | via: 130.235.83.152 | ||
| + | - to: 192.168.68.0/ | ||
| + | via: 130.235.83.152 | ||
| + | </ | ||