From 292f81ce830ee7d787e304cd5884bd375f0fa673 Mon Sep 17 00:00:00 2001 From: spiritlhl <103393591+spiritLHLS@users.noreply.github.com> Date: Sun, 6 Jul 2025 20:02:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AE=9E=E6=B5=8B=E9=9C=80=E8=A6=81open?= =?UTF-8?q?wrt=E5=A4=84=E7=90=86=E7=BD=91=E7=BB=9C=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=EF=BC=8C=E6=97=A0=E6=B3=95=E7=9B=B4=E6=8E=A5NAT=E5=81=9A?= =?UTF-8?q?=E7=BD=91=E7=BB=9C=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extra_scripts/wireless/wireless.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/extra_scripts/wireless/wireless.sh b/extra_scripts/wireless/wireless.sh index ebd82f0..511ab09 100644 --- a/extra_scripts/wireless/wireless.sh +++ b/extra_scripts/wireless/wireless.sh @@ -1,7 +1,7 @@ #!/bin/bash # from # https://github.com/oneclickvirt/pve -# 2025.07.05 +# 2025.07.06 cd /mnt/wireless || exit 1 for i in {1..6}; do INSTALLED_PACKAGES="" @@ -92,18 +92,18 @@ iface $WIFI_INTERFACE inet static gateway 192.168.124.1 dns-nameservers 144.144.144.144 metric 10 - -auto vmbr1 -iface vmbr1 inet static - address 172.16.100.1 - netmask 255.255.255.0 - bridge_ports none - bridge_stp off - bridge_fd 0 - post-up echo 1 > /proc/sys/net/ipv4/ip_forward - post-up iptables -t nat -A POSTROUTING -s '172.16.100.0/24' -o $WIFI_INTERFACE -j MASQUERADE - post-down iptables -t nat -D POSTROUTING -s '172.16.100.0/24' -o $WIFI_INTERFACE -j MASQUERADE EOF +# auto vmbr1 +# iface vmbr1 inet static +# address 172.16.100.1 +# netmask 255.255.255.0 +# bridge_ports none +# bridge_stp off +# bridge_fd 0 +# post-up echo 1 > /proc/sys/net/ipv4/ip_forward +# post-up iptables -t nat -A POSTROUTING -s '172.16.100.0/24' -o $WIFI_INTERFACE -j MASQUERADE +# post-down iptables -t nat -D POSTROUTING -s '172.16.100.0/24' -o $WIFI_INTERFACE -j MASQUERADE +# EOF echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf sysctl -p echo "Added network interface configuration for $WIFI_INTERFACE"