From 63505ff3516e117730ebba89014c13fcb269f1b0 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 19 Mar 2026 13:05:52 +0500 Subject: [PATCH] new dns --- dns | 18 ++++++++++++------ int | 21 +++++++++------------ 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/dns b/dns index 0fcba2c..6747ba9 100755 --- a/dns +++ b/dns @@ -14,12 +14,18 @@ options { forwarders { 8.8.8.8; }; }; +logging { + channel default_debug { + file "data/named.run"; + severity dynamic; + }; +}; zone "." IN { type hint; - file "var/named/named.ca"; + file "named.ca"; }; -include "/etc/named.rfcq912.zones"; +include "/etc/named.rfc1912.zones"; include "/etc/named.root.key"; zone "au-team.irpo" { @@ -37,10 +43,10 @@ type master; file "master/4.168.192.in-addr.arpa"; }; -zone "4.16.172.in-addr.arpa" { -type master; -file "4.16.172.in-addr.arpa"; -}; +#zone "4.16.172.in-addr.arpa" { +#type master; +#file "4.16.172.in-addr.arpa"; +#}; EOF diff --git a/int b/int index c58a840..74aaef1 100755 --- a/int +++ b/int @@ -11,7 +11,7 @@ while a==1 echo "3. IP-адрес" echo "4. Forward и masquerade" echo "5. Перезагрузить машину" - echo "6. Аккаунты" + echo "6. Time zone" echo "0. Выход" echo "" read num @@ -30,7 +30,7 @@ while a==1 echo "_____________________Enp0s3_______________________" read -p "Введите ip-адрес или пропустите для DHCP: " ip_s3 if [[ -n $ip_s3 ]]; then - read -p "Введите шлюз: " gt_s3 + read -p "Введите шлюз или пропустите: " gt_s3 cat > /etc/NetworkManager/system-connections/enp0s3.nmconnection << EOF [connection] id=enp0s3 @@ -73,7 +73,7 @@ EOF fi echo "" echo "___________________________Enp0s10___________________________" - read -p "Enter ip or skip: " ip_s10 + read -p "Введите ip-адрес или пропустите: " ip_s10 if [[ -n $ip_s10 ]]; then nmcli connection modify enp0s10 ipv4.method manual ipv4.addresses $ip_s10 ipv6.method disabled systemctl restart NetworkManager @@ -86,11 +86,12 @@ EOF sysctl net.ipv4.ip_forward=1 >> /etc/sysctl.conf systemctl enable --now iptables iptables -F - read -p "Введите количество ip-адресов для Masquerade: " a + read -p "Введите количество ip-адресов для которых необходимо задать Masquerade: " a if (( $a == 2 )); then if [[ -n $ip_s8 || $ip_s9 ]]; then iptables -t nat -A POSTROUTING -s $ip_s8 -o enp0s3 -j MASQUERADE iptables -t nat -A POSTROUTING -s $ip_s9 -o enp0s3 -j MASQUERADE + echo "Готово" else read -p "Введите ip-адрес для enp0s8(192.168.0.0/30): " ip_s8 read -p "Введите ip-адрес для enp0s9(192.168.0.0/30): " ip_s9 @@ -100,6 +101,7 @@ EOF elif (( $a == 1)); then if [[ -n $ip_s8 ]]; then iptables -t nat -A POSTROUTING -s $ip_s8 -o enp0s3 -j MASQUERADE + echo "Готово" else read -p "Введите ip для enp0s8: " ip_s8 iptables -t nat -A POSTROUTING -s $ip_s8 -o enp0s3 -j MASQUERADE @@ -126,14 +128,9 @@ EOF echo"" elif (( $num == 6)); then - echo "________________________Аккаунт_________________________" - read -p "Yes or no?: " acc - if [[ -n $acc ]]; then - read -p "Введите имя аккаунта: " acc_n - cat >> /etc/sudoers << EOF -$acc_n ALL=(ALL)NOPASSWD:ALL -EOF + echo "For watch time zone inter: timedatectl list-timezones" + echo "Inter timedatectl set-timezone 'timezone' " + chmod 600 /etc/sudoers - fi fi done