From ff84ac049b76ff2c74403ad3abc67bca753e0c44 Mon Sep 17 00:00:00 2001 From: "tiago.ferreira" Date: Mon, 2 Feb 2026 13:42:03 +0000 Subject: [PATCH] Atualizar initrouter.sh --- initrouter.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/initrouter.sh b/initrouter.sh index 9531194..d0115bc 100644 --- a/initrouter.sh +++ b/initrouter.sh @@ -2,9 +2,17 @@ case $1 in asor) - apt install bash-completion ca-certificates vim wget curl git -y + read -p "Qual o nome do server? " SERVER sysctl net.ipv4.ip_forward=1 dhclient enp0s3 + apt update && apt upgrade -y + apt install bash-completion ca-certificates vim wget curl git -y + hostnamectl set-hostname $SERVER + if grep -q '^127.0.1.1' /etc/hosts; then + sed -i "s/^127.0.1.1.*/127.0.1.1\t$SERVER/" /etc/hosts + else + echo -e "127.0.1.1\t$SERVER" >> /etc/hosts + fi ip address add 172.17.0.1/24 dev enp0s8 ip address add 192.168.56.10/24 dev enp0s9 nft add table ip nat