<r>再設定ufw規則
<CODE><s>[code]</s># 1. Set default policies to deny incoming, allow outgoing
sudo ufw default deny incoming
sudo ufw default allow outgoing

# 2. Allow necessary services (HTTP/HTTPS)
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp

# 3. Allow DNS (UDP &amp; TCP for queries)
sudo ufw allow 53

# 5. Enable UFW
sudo ufw enable

# 6. Verify rules
sudo ufw status verbose
<e>[/code]</e></CODE>

從server world 上設定Debian 13<br/>
再裝dns bind9
<CODE><s>[code]</s> apt -y install bind9 bind9utils<e>[/code]</e></CODE>
nano /etc/default/named
<CODE><s>[code]</s>#
# run resolvconf?
#RESOLVCONF=no
# startup options for the server
#改下面這一行
OPTIONS="-u bind -4"
<e>[/code]</e></CODE>
nano /etc/resolv.conf<br/>
例如我的ip是123.240.180.243
<CODE><s>[code]</s># Generated by NetworkManager
nameserver 123.240.180.243
#一定要設下面這行
nameserver 8.8.8.8
<e>[/code]</e></CODE>
並開機啟動named服務
<CODE><s>[code]</s>systemctl enable named<e>[/code]</e></CODE>
<CODE><s>[code]</s>systemctl restart named<e>[/code]</e></CODE>
接下來用Debian安裝mediawiki來安裝apache2 php mysql(也就是mariadb)<br/>
<URL url="https://zine-tw.com/viewtopic.php?p=3808"><s>[url]</s><LINK_TEXT text="viewtopic.php?p=3808">https://zine-tw.com/viewtopic.php?p=3808</LINK_TEXT><e>[/url]</e></URL><br/>
接下來設定 apache2 的 ssl 傳輸加密<br/>
<URL url="https://zine-tw.com/viewtopic.php?t=3902&amp;sid=e051ab242bfc9a425176710beb282da0"><LINK_TEXT text="viewtopic.php?t=3902&amp;sid=e051ab242bfc9a ... 0beb282da0">https://zine-tw.com/viewtopic.php?t=3902&amp;sid=e051ab242bfc9a425176710beb282da0</LINK_TEXT></URL></r>