commit 72548652cdf01f109a673a1ae8e3f879f3c64bd6 Author: tiago.ferreira Date: Mon Aug 18 18:00:34 2025 +0000 Enviar arquivos para "/" diff --git a/router[1].sh b/router[1].sh new file mode 100644 index 0000000..36437f9 --- /dev/null +++ b/router[1].sh @@ -0,0 +1,32 @@ +#!/bin/bash +echo "Router, ok!" + +ip link set up dev enp0s8 +ip link set up dev enp0s9 +ip link set up dev enp0s10 + +wget https://git.tmferreira.tec.br/tiago.ferreira/GRC/raw/branch/main/interfaces -O /etc/network/interfaces + +ip address flush enp0s8 +ip address flush enp0s10 +ip address flush enp0s9 + +ip address add 172.17.0.1/24 dev enp0s8 +ip address add 192.168.200.1/24 dev enp0s9 +ip address add 192.168.56.200/24 dev enp0s10 + +sysctl -w net.ipv4.ip_forward=1 + +iptables -t nat -F + +iptables -t nat -A POSTROUTING -o enp0s3 -j MASQUERADE + +iptables -t nat -A PREROUTING -p tcp --dport 10000 -j DNAT --to-destination 192.168.200.2:22 +iptables -t nat -A PREROUTING -p tcp --dport 10001 -j DNAT --to-destination 192.168.200.3:22 +iptables -t nat -A PREROUTING -p tcp --dport 10002 -j DNAT --to-destination 172.17.0.2:22 + +systemctl restart named + +apt clean + +poweroff