先挂一个rescue系统重启并进入,挂载/dev/sda5分区.
www.system-rescue-cd.org 可以下载, 用linux带rescue的iso也可以.
操作流程大致如下:
mkdir /mnt/sda5
mount /dev/sda5 /mnt/sda5
cp /mnt/sda5/state.tgz /tmp
cd /tmp
tar -xf state.tgz #(这一步对文件进行解压之后,会生成一个local.tgz的文件)
tar -xf local.tgz #(这一步操作结束后,tmp下会有一个etc目录)
vim etc/shadow #(把root的密码删掉)
rm -f /tmp/state.tgz /tmp/local.tgz
tar -zcvf local.tgz etc/
tar -zcvf state.tgz local.tgz
cp state.tgz /mnt/sda5/
演示地址:https://files.photo.gallery/demo/?samples
下载链接:https://cdn.jsdelivr.net/npm/files.photo.gallery/index.php
设置说明:https://forum.photo.gallery/viewtopic.php?f=66&t=9964
开心补丁:https://cdn.jsdelivr.net/gh/yyingc/[email protected]/files.js
php组建需求: fileinfo exif imagemagick
配置根目录、密码访问和排除不需要显示的目录:
// 根目录配置
'root' => '根目录路径', // root path relative to script.
'start_path' => false, // start path relative to script. If empty, root is start path
// 登录账号密码配置
'username' => 'zhujizixun',
'password' => '12345678', // Add password directly or use https://tinyfilemanager.github.io/docs/pwd.html to encrypt the password (encrypted password is more secure, as it prevents your password from being exposed directly in a file).
// 排除文件或者目录
'files_exclude' => '/.(html|xml)$/i', // '/.(pdf|jpe?g)$/i'
'dirs_exclude' => '//js|/_files(/|$)/i', //'//Convert|/football|/node_modules(/|$)/i',
'allow_symlinks' => true, // allow symlinks
location ~ /(announcements|knowledgebase|download|store|password|cart|account|subscription)(.*) { rewrite (.*) /index.php; }
location ~ /(.*)/(addons|apps|search|domains|help|services|setup|utilities|clients)(.*) { rewrite (.*) /admin/index.php;}
方案一:
if (!-f $request_filename){ rewrite (.*) /index.php; }
方案二:
rewrite ^/(announcements|knowledgebase|download|store|password|cart|account|subscription)(.*)$ /index.php;
其他设置:
location ~* \.(tpl|inc|cfg)$ { deny all; }
location ^~ /vendor/ { deny all; }
方案一主要匹配本地没有的就丢index.php上去, 也可以用try_files
方案二主要是直接进行rewrite.
其他配置主要是隐藏一些目录和文件不让访问.
总的来说用 location来匹配稍微稳妥一些, 例如 /admin/clientsservices.php 会被为静态匹配到, 还是得运用if来判断匹配.
smb跨网的速度慢到爆, 虽然可以在Installation profiles里面增加一个外带本地smb路径, 在能不改变就不改变的前提下解决.
在ROS里面把445,137,138,139的tcp和udp重新定向到网内的smb服务器ip上.
/ip firewall nat
add action=dst-nat chain=dstnat dst-address=远程SMB dst-address-type=!local dst-port=445,137,138,139 protocol=udp to-addresses=本地SMB
add action=dst-nat chain=dstnat dst-address=远程SMB dst-address-type=!local dst-port=445,137,138,139 protocol=tcp to-addresses=本地SMB
然后将nocps下smb目录文件同步出来, 先把nocps的smb挂载到本地目录然后用rsync进行同步, 然后再分发到其他区域的smb服务器.
其实能在路由上做nat的情况, 完全可以把smb单独出来分区域镜像跑, 但是我不太想去折腾了, 能省一步省一步.
none
Regular Expressions are used often for BGP route manipulation or filtering. In this lesson we’ll take a look at some useful regular expressions. First let’s take a look at the different characters that we can use:
Characters
?
| repeats the previous character one or zero times. |
*
| repeats the previous character zero or many times. |
+
| repeats the previous character one or more times. |
^
| matches the beginning of a string. |
$
| matches the end of a string. |
[]
| is a range. |
_
| matches the space between AS numbers or the end of the AS PATH list. |
\\
| is an escape character. You’ll need this for BGP confederations. |
Examples
^$ | matches an empty AS PATH so it will match all prefixes from the local AS. |
^51_ | matches prefixes from AS 51 that is directly connected to our AS. |
_51_ | matches prefixes that transit AS 51. |
_51$ | matches prefixes that originated in AS 51, the $ ensures that it’s the beginning of the AS PATH. |
^([0-9]+)_51 | matches prefixes from AS 51 where AS 51 is behind one of our directly connected AS’es. |
^51_([0-9]+) | matches prefixes from the clients of directly connected AS 51. |
^(51_)+([0-9]+) | matches prefixes from the clients of directly connected AS 51, where AS 51 might be doing AS PATH prepending. |
^51_([0-9]+_)+ | matches prefixes from the clients of directly connected AS 51, where the clients might be doing AS PATH prepending. |
^\65200\) | matches prefixed from confederation peer 65200. |
https://networklessons.com/bgp/bgp-regular-expressions-examples/
none
#----------------------
Summary Table
none
1. 查看接口的统计信息
* display interface命令用来查看接口当前运行状态和接口统计信息。
* display counters命令用来查看接口的流量统计计数。
* display counters error命令用来查看错误报文的统计信息。
* display counters rate命令用来查看接口的入方向或出方向流量速率。
* display counters top interface report用来显示接口流量TOP N的统计报告。
* display ip interface命令用来查看接口与IP相关的配置和统计信息,包括接口接收和发送的报文数、字节数和组播报文数,以及接口接收、发送、转发和丢弃的广播报文数。
2. 查看接口的状态
* display interface brief命令用来查看接口状态和配置的简要信息。
* display interface description命令用来查看指定接口的描述信息。
* display interface ethernet brief命令用来查看以太网接口的简要信息。
* display ip interface brief和display ip interface description命令用来查看接口与IP相关的简要信息,包括IP地址、子网掩码、物理链路和协议的Up/Down状态以及处于不同状态的接口数目。
3. 查看光功率和模块型号
* display interface interface-type interface-number查看某光口插入的光模块的信息。
* display transceiver diagnosis interface查看所有光口的收发光功率信息。
* display transceiver diagnosis interface interface-type interface-number查看某光口的收发光功率信息。
#!/bin/bash
dec2ip () {
local ip dec=$@
for e in {3..0}
do
((octet = dec / (256 ** e) ))
((dec -= octet * 256 ** e))
ip+=$delim$octet
delim=.
done
printf '%s\n' "$ip"
}
dec2ip "$@"
#!/bin/bash
ip2dec () {
local a b c d ip=$@
IFS=. read -r a b c d <<< "$ip"
printf '%d\n' "$((a * 256 ** 3 + b * 256 ** 2 + c * 256 + d))"
}
ip2dec "$@"
dec2ip ()
{
local v=$1
local i1=$((v>>24&255))
local i2=$((v>>16&255))
local i3=$((v>>8&255))
local i4=$((v&255))
printf '%d.%d.%d.%d\n' $i1 $i2 $i3 $i4
}
tohex
echo -n 10.0.14.5 | hexdump -e '/1 "%02x"';
ip2hex
gethostip -x 10.0.14.5
hex2ip
hextoip() { hex=$1; printf "%d." 0x${hex:0:2}; printf "%d." 0x${hex:2:2}; printf "%d." 0x${hex:4:2}; printf "%d" 0x${hex:6:2}; }
none
Linux Endpunkte
GRETAP
/bin/ip link add 命名 type gretap local 本地IPv4 remote 远程IPv4 ttl 255
/bin/ip link set dev 命名 up
VXLAN
/bin/ip link add 命名 type vxlan local 本地IPv4 remote 远程IPv4 dstport 4789 id 0 ttl 255
/bin/ip link set dev 命名 up
Ethernet over IP
# install
wget https://raw.githubusercontent.com/4b42/4ixp/master/eoip/install.sh -O /tmp/eoip.sh
chmod +x /tmp/eoip.sh
/tmp/eoip.sh
rm -f /tmp/eoip.sh
# config
cat << EOF > /etc/eoip.cfg
[eoip命名]
id=0
dst=远程IPv4
EOF
/usr/local/bin/eoip /etc/eoip.cfg
MikroTik RouterOS Endpunkte
/interface eoip add !keepalive name=命名 local-address=本地IPv4 remote-address=远程IPv4 tunnel-id=0
printf "user:$(openssl passwd -crypt 123456)\n" >>conf/htpasswd
首先, 近些年的版权投诉越来越完善, 以前中文内容基本很少有版权投诉.
从英文到韩日资源再到中文的资源, 逐渐的中文资源的投诉越来越多, 英文等外语类的投诉相对较少了很多.
因为版权的原因, 一有投诉有的人积极处理有的人装死跑路换一家主机商,反正市面上成群结队的主机供应商可以选, 都是东躲西藏的心态, 长期以往后形成了一种拔屌无情的形态.
常见的一些特征: 大部分技术比较菜知识储备少, 被入侵或者注入只能哭; 还保持着10多年前的只会采集外链模式 ;对于版权投诉部分人呈现出暴躁的状态, 对网络资源开销较大, 类似和次于早期开飞机场的.
经验总结:
总体来说这部分人有一定不错的营收, 喜欢套近乎获取一些技术支持,获取一些优势价格以及对版权投诉宽裕处理, 比较注重所失不注重所得. 不论提供多优势多有利条件都会随时扭头翻脸.
不建议提供太多的技术支持,资源支持等等, 在成本资源和人力资源方面超支的该收钱必须得收, 没有让步的必要.
对于版权投诉该处理就处理不要嫌麻烦, 投诉量大又不处理的完全没有留的必要, 趁早清退免于问题扩大.
none
ROS历史版本下载
https://www.routeros.co.id/
https://www.mikrotik.com/download/archive
none