2022年11月

国内安装debian,当然要用国内的源,优点只有一个:速度快。国内的源比较多,下面就把更改源的方法说一下。

登录到debian 10,如果是root用户,直接输入命令,如果是非root用户,需要在命令前面加上sudo。

一,先备份一下原始的源

mv /etc/apt/sources.list /etc/apt/sources.list.bak

这样就把原始的源文件改了一个名字,备份一下,不好删掉。

二,更新为国内的源

然后把下面的源地址复制进去sources.list文件

deb http://mirrors.ustc.edu.cn/debian/ buster main
deb-src http://mirrors.ustc.edu.cn/debian/ buster main

deb http://security.debian.org/debian-security buster/updates main
deb-src http://security.debian.org/debian-security buster/updates main

# buster-updates, previously known as 'volatile'
deb http://mirrors.ustc.edu.cn/debian/ buster-updates main
deb-src http://mirrors.ustc.edu.cn/debian/ buster-updates main

deb http://mirrors.ustc.edu.cn/debian/ buster-backports main non-free contrib
deb-src http://mirrors.ustc.edu.cn/debian/ buster-backports main non-free contrib

保存

三,更新一下源

apt-get update

前几天老蒋遇到一个网友在服务器上安装某个软件的时候无法连通,感觉到应该是防火墙导致的问题。这里他安全组放行端口也没有解决问题,这里怀疑是他的Debian系统防火墙拦截导致的。于是考虑直接关闭防火墙,然后看看是否解决问题,这里他的系统是debian,我们看看如何关闭防火墙的。

/etc/init.d/ufw stop
Select CodeCopy
这里他采用的BT面板,所以直接用这个命令即可关闭,之后就解决问题。但是这里既然提到ufw命令,这里记录下使用规则,以后如果有需要用到还可以参考。

1、检查状态

ufw status

这里我们可以看到防火墙的状态。

2、关闭和开启

ufw enable //开启
ufw disable //关闭
Select CodeCopy
这里我们可以使用命令快速开启和关闭防火墙。

3、开启指定tcp或者udp端口

ufw allow 22/tcp
Select CodeCopy
4、同时开启tcp与udp端口

ufw allow 112233
Select CodeCopy
5、删除端口

ufw delete allow 445

如果整站复制其他站程序,应用中心还是别人的,需要改成自己的

方案一
进入数据库执行命令

UPDATE `pre_common_setting` SET `svalue` = '' WHERE `pre_common_setting`.`skey` = 'siteuniqueid';
方案二
修改数据

进入 per_common_setting 表
进入后点击 搜索,skey 字段搜索值 siteuniqueid 点击执行
点击编辑 svalue 值 填写 000或者留空 执行
进入DZ后台-工具-更新缓存
进入应用中心,这时候会出现 注册按钮,重新注册和绑定QQ即可

1.PrivadoVPN:https://privadovpn.com/pricing

2.Windscribe:https://windscribe.com/download

3.AtlasVPN:https://atlasvpn.com/free-vpn

4.zoogvpn:https://zoogvpn.com/free-vpn/

5.ProtonVPN:https://protonvpn.com/free-vpn

6.Hideme VPN:https://hide.me/en/free-vpn

7.TunnelBear:https://www.tunnelbear.com/

8.surfshark VPN 85%优惠+3个月畅享:https://bittly.cc/Surfshark

为了方便随时随地访问,我们往往需要在群晖 NAS 接入的路由上做好端口映射,不过群晖的套件那么多,每个应用的端口又是多少呢?贴心的杜老师为大家准备了群晖 NAS 全应用端口对应列表,方便您的使用!

Setup Utilities
Type Port Number Protocol
Synology Assistant 9999, 9998, 9997 UDP
Backup
Type Port Number Protocol
Active Backup for Business 5510 (Synology NAS) Note: Only used for the backup of Hyper-V or physical Windows device. 443 (vCenter Server and ESXi host), 902 (ESXi host); 5985 (HTTP for Hyper-V), 5986 (HTTPS for Hyper-V) TCP
Data Replicator, Data Replicator II, Data Replicator III 9999, 9998, 9997, 137, 138, 139, 445 TCP
DSM 5.2 Data Backup, rsync, Shared Folder Sync, Remote Time Backup 873, 22 (if encrypted over SSH) TCP
Hyper Backup (destination) 6281 (multi-version backup), 22 (if encrypted over SSH), 873 (remote data copy) TCP
Hyper Backup Vault, DSM 5.2 Archiving Backup 6281 TCP
LUN Backup 3260 (iSCSI), 873, 22 (if encrypted over SSH) TCP
Snapshot Replication 3261 (iSCSI LUN), 5566 (shared folder) TCP
Download
Type Port Number Protocol
BT 16881 (for DSM 2.0.1 or above); 6890-6999 (for DSM 2.0.1-3.0401 or earlier version) TCP/UDP
eMule 4662 TCP
eMule 4672 UDP
Web Applications
Type Port Number Protocol
DSM 5000 (HTTP), 5001 (HTTPS) TCP
File Station 5000 (HTTP, additional port can be added), 5001 (HTTPS, additional port can be added) TCP
Mail Server
Type Port Number Protocol
IMAP 143 TCP
IMAP over SSL/TLS 993 TCP
POP3 110 TCP
POP3 over SSL/TLS 995 TCP
SMTP 25 TCP
SMTPs 465 TCP
File Transferring
Type Port Number Protocol
AFP 548 TCP
CIFS smbd: 139 (netbios-ssn), 445 (microsoft-ds) TCP/UDP
CIFS Nmbd: 137, 138 UDP
FTP, FTP over SSL, FTP over TLS 21 (command), 20 (data connection in Active Mode), 1025-65535 (data connection in Passive Mode) Note: The default range varies according to your Synology product models. TCP
iSCSI 3260 TCP
NFS 111, 892, 2049 TCP/UDP
TFTP 69 UDP
WebDAV, CalDAV 5005, 5006 (HTTPS) TCP
Packages
Type Port Number Protocol
Audio Station 1900 (UDP), 5000 (HTTP, additional port can be added), 5001 (HTTPS, additional port can be added), 5353 (Bonjour service), 6001-6010 (AirPlay control/timing) TCP/UDP
Central Management System 5000 (HTTP), 5001 (HTTPS) TCP
CIFS Scale-out Cluster 49152-49252 TCP/UDP
CIFS Scale-out Cluster 17909, 17913, 19998, 24007, 24008, 24009-24045, 38465-38501, 4379 TCP
Cloud Station 6690 TCP
DHCP Server 67, 68 UDP
LDAP Server (formerly Directory Server) 389 (LDAP), 636 (LDAP with SSL) TCP
Download Station 5000 TCP
iTunes Server 3689 TCP
Logitech® Media Server 3483, 9002 TCP
Mail Station 80 (HTTP), 443 (HTTPS) TCP
Media Server 1900 (UPnP), 50001 (content browsing), 50002 (content streaming) TCP/UDP
Migration Assistant 7400-7499 DRBD
Note Station 5000 (HTTP), 5001 (HTTPS) TCP
Photo Station, Web Station 80 (additional port can be added), 443 (HTTPS) TCP
Presto File Server 3360, 3361 TCP/UDP
Proxy Server 3128 TCP
Surveillance Station 9900 (HTTP), 9901 (HTTPS) TCP
Synology Calendar 38008, 38443 CalDAV
Synology CardDAV Server 8008 (HTTP), 8443 (HTTPS) TCP
Synology Chat 5000 (HTTP), 5001 (HTTPS) TCP
Synology Contacts 5555 CardDAV
Synology Directory Server 88 (Kerberos), 389 (LDAP), 464 (Kerberos password change) TCP/UDP
Synology Directory Server 135 (RPC Endpoint Mapper), 636 (LDAP SSL), 1024 (RPC), 3268 (LDAP GC), 3269 (LDAP GC SSL) TCP
Synology Drive Server 80 (link sharing), 443 (link sharing), 5000 (HTTP), 5001 (HTTPS), 6690 (Synology Drive Client) TCP
Synology Moments 5000 (HTTP), 5001 (HTTPS) TCP
Syslog Server 514 (additional port can be added) TCP/UDP
Video Station 1900 (UDP), 5000 (HTTP), 5001 (HTTPS), 9025-9040, 5002, 5004, 65001 (for using the HDHomeRun network tuner) TCP/UDP
Virtual Machine Manager 2379-2382 (cluster network), 3260-3264 (iSCSI), 5000 (HTTP), 5001 (HTTPS), 5566 (replication), 16509, 16514, 30200-30300 TCP
VPN Server (OpenVPN) 1194, 1195 UDP
VPN Server (PPTP) 1723, 2001 TCP
VPN Server (L2TP/IPSec) 500, 1701, 4500 UDP
Mobile Applications
Type Port Number Protocol
DS audio 5000, 5001 (HTTPS) TCP
DS cam 5000, 5001 (HTTPS) TCP
DS cloud 6690 TCP
DS file 5005 (HTTP), 5006 (HTTPS) TCP
DS finder 5000 (HTTP), 5001 (HTTPS) TCP
DS get 5000 (HTTP), 5001 (HTTPS) TCP
DS note 5000 (HTTP), 5001 (HTTPS) TCP
DS photo 80, 443 (HTTPS) TCP
DS video 5000 (HTTP), 5001 (HTTPS) TCP
Synology Drive 5000 (HTTP), 5001 (HTTPS) TCP
Synology Moments 5000 (HTTP), 5001 (HTTPS) TCP
Printers, UPS, and Peripheral Equipments
Type Port Number Protocol
Bonjour 5353 UDP
LPR 515 UDP
Network Printer (IPP)/CUPS 631 TCP
Network MFP 3240-3259 TCP
UPS 3493 TCP
System
Type Port Number Protocol
LDAP 389, 636 (SLAPD) TCP
MySQL 3306 TCP
Resource Monitor/SNMP 161 TCP/UDP
SSH/SFTP 22 TCP
Telnet 23 TCP