Linux使用ip route封禁IP段
对于绑定了很多IP遇上暴力破解ssh之类的, 用iptables封IP会比较慢.
用ip route把对方IP段丢路由黑洞封掉会立竿见影.
ip route add blackhole 10.0.0.0/24
对于绑定了很多IP遇上暴力破解ssh之类的, 用iptables封IP会比较慢.
用ip route把对方IP段丢路由黑洞封掉会立竿见影.
ip route add blackhole 10.0.0.0/24
最近安装php发现编译失败, 搜索一圈后发现软件包仓库改crb去了,稍微改一下脚本判断就解决了.
sed -i 's/enabled=0/enabled=1/g' /etc/yum.repos.d/*-{crb,plus}.repo
如果不想改repo配置,则安装的时候启用一下crb源.
dnf -y --enablerepo=crb install libzip-devel oniguruma-devel rrdtool-devel
https://mirror.stream.centos.org/9-stream/CRB/x86_64/os/Packages/
另外libc-client-devel的包暂时也没找到, 用remi的源安装uw-imap-devel替代解决了.
dnf install -y http://rpms.remirepo.net/enterprise/remi-release-9.rpm
dnf -y --enablerepo=remi install uw-imap-devel
IP="168.192.in-addr.arpa
10.10.in-addr.arpa
";
for list in $IP
do
pdnsutil create-zone $list ns1.server.com
pdnsutil add-record $list @ NS ns2.server.com
pdnsutil replace-rrset $list . SOA 'ns1.server.com. ns2.server.com. 0 10800 3600 604800 3600'
pdnsutil increase-serial $list
done
for i in {0..255}; do
for o in {0..255}; do
pdnsutil add-record 168.192.in-addr.arpa $o.$i PTR test.example.com
done;
done;
whmcs自定义模版调用login.tpl模版报错
Error: Error: Call to a member function getButtonClass() on null in
Error: Error: Call to a member function isEnabled() on null in
主要问题在$captcha上, {if $captcha->isEnabled()} 和{$captcha->getButtonClass($captchaForm)}
自定义php文件里面引入一下Captcha()类就解决了.
$smartyvalues["captcha"] = new WHMCS\Utility\Captcha(); 官方指引:https://wiki.samba.org/index.php/Configure_Samba_to_Work_Better_with_Mac_OS_X
smb.conf配置后TimeMachine直接可以备份数据.
[Global]
vfs objects = fruit streams_xattr
fruit:metadata = stream
fruit:model = MacSamba
fruit:posix_rename = yes
fruit:veto_appledouble = no
fruit:nfs_aces = no
fruit:wipe_intentionally_left_blank_rfork = yes
fruit:delete_empty_adfiles = yes
[TimeMachineBackup]
fruit:time machine = yes
# fruit:time machine max size = SIZE
不用再设置什么虚拟磁盘进行挂载了, 当airport一样用.
https://lg.he.net/
https://lg.sgix.sg
https://www.cogentco.com/en/looking-glass
https://www.cmi.chinamobile.com/en/looking-glass
https://lg.ibeo.hgc-intl.com/
https://lg.ix.br/
https://lg.ntt.lt/
https://www.gin.ntt.net/looking-glass-landing/
https://lookingglass.consoleconnect.com/
https://lookingglass.centurylink.com/
http://lg.level3carrier.com/lg/lg.cgi
https://lg.telia.net/
https://lg.twelve99.net/
https://ipms.chinatelecomglobal.com/public/lookglass/lookglassDisclaimer.html?lang=zh_CN
https://stixlg.singtel.com/dashboard
https://lg.gsl.tools/
个人经验
1.RAID5/6 如同泡水的卫生纸, 出了问题的时候碎得渣, 很难救.
2.仅次于比RAID0安全一点点,安全性低于RAID1
3. RAID5/6掉盘或者迁移主机, 恢复慢导入硬盘慢容易崩.
4.RAID50 RAID60 没用过不评价.
最后总结: 一块盘或者一块以上, 数据无所谓要空间和速度组RAID0就无所谓;
两块盘要安全首选RAID1, 低成本安全储存方案;
只有三块硬盘的时候建议追加一块, 跨入最低门槛用四块硬盘直接组RAID10, 兼顾安全和速度以及一半硬盘的容量,
换阵列卡或者迁移到其他机箱, 导入快rebuild同步快, 掉了一块盘即使跑半年也不用担心坏.