作者归档:caspian

浙江移动IPTV

CCTV1HD,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228318/42329859.smil/index.m3u8?fmt=ts2hls
CCTV2HD,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228348/42329899.smil/index.m3u8?fmt=ts2hls
CCTV4,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228306/42329183.smil/index.m3u8?fmt=ts2hls
CCTV7HD,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228330/42329865.smil/index.m3u8?fmt=ts2hls
CCTV9HD,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228342/42329996.smil/index.m3u8?fmt=ts2hls
CCTV10HD,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228327/42329895.smil/index.m3u8?fmt=ts2hls
CCTV11,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228297/42329184.smil/index.m3u8?fmt=ts2hls
CCTV12HD,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228312/42329831.smil/index.m3u8?fmt=ts2hls
CCTV13,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228266/42329220.smil/index.m3u8?fmt=ts2hls
CCTV14HD,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228335/42329999.smil/index.m3u8?fmt=ts2hls
CCTV15,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228281/42329182.smil/index.m3u8?fmt=ts2hls
CCTVNEWS,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228416/44198373.smil/index.m3u8?fmt=ts2hls
浙江卫视HD,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228324/42329891.smil/index.m3u8?fmt=ts2hls
湖南卫视HD,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228336/42329937.smil/index.m3u8?fmt=ts2hls
东方卫视HD,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228354/42329929.smil/index.m3u8?fmt=ts2hls
江苏卫视HD,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228351/42329921.smil/index.m3u8?fmt=ts2hls
北京卫视HD,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228321/42329925.smil/index.m3u8?fmt=ts2hls
浙江民生休闲,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228390/42614329.smil/index.m3u8?fmt=ts2hls
杭州综合,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228393/42614351.smil/index.m3u8?fmt=ts2hls
杭州3生活,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228576/59463348.smil/index.m3u8?fmt=ts2hls
杭州4影视,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228579/59463352.smil/index.m3u8?fmt=ts2hls
杭州5少儿,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228587/59463516.smil/index.m3u8?fmt=ts2hls
杭州6导视,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228590/59463398.smil/index.m3u8?fmt=ts2hls
优优宝贝,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221229380/78052125.smil/index.m3u8?fmt=ts2hls
西湖明珠,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228528/54916992.smil/index.m3u8?fmt=ts2hls
金鹰纪实,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221229328/78602057.smil/index.m3u8?fmt=ts2hls
快乐宠物,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221229340/80672346.smil/index.m3u8?fmt=ts2hls
四海钓鱼,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228662/60366869.smil/index.m3u8?fmt=ts2hls
车迷频道,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221229410/80671671.smil/index.m3u8?fmt=ts2hls
华数0,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228564/58960521.smil/index.m3u8?fmt=ts2hls
高尔夫网球,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228669/60366820.smil/index.m3u8?fmt=ts2hls
卡酷少儿,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228375/42613213.smil/index.m3u8?fmt=ts2hls
优漫卡通,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228378/42613464.smil/index.m3u8?fmt=ts2hls
金鹰卡通,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228362/42613591.smil/index.m3u8?fmt=ts2hls
少儿动漫HD,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228387/42613922.smil/index.m3u8?fmt=ts2hls
嘉佳卡通,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228593/59463357.smil/index.m3u8?fmt=ts2hls
欧美影院HD,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228384/42613784.smil/index.m3u8?fmt=ts2hls
亚洲影院HD,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228365/42613673.smil/index.m3u8?fmt=ts2hls
探索纪实HD,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228366/42330389.smil/index.m3u8?fmt=ts2hls
精品剧场HD,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228360/42330404.smil/index.m3u8?fmt=ts2hls
风尚音乐HD,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228344/42330393.smil/index.m3u8?fmt=ts2hls
深圳卫视HD,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228314/42329941.smil/index.m3u8?fmt=ts2hls
广东卫视HD,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228329/42329945.smil/index.m3u8?fmt=ts2hls
天津卫视HD,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228320/42329956.smil/index.m3u8?fmt=ts2hls
山东卫视HD,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228308/42329957.smil/index.m3u8?fmt=ts2hls
湖北卫视HD,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228357/42329887.smil/index.m3u8?fmt=ts2hls
黑龙江卫视HD,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228302/42329917.smil/index.m3u8?fmt=ts2hls
重庆卫视HD,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228296/42329851.smil/index.m3u8?fmt=ts2hls
辽宁卫视HD,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228317/42329987.smil/index.m3u8?fmt=ts2hls
安徽卫视HD,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228332/42329873.smil/index.m3u8?fmt=ts2hls
江西卫视HD,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228293/42329843.smil/index.m3u8?fmt=ts2hls
四川卫视,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228263/42329171.smil/index.m3u8?fmt=ts2hls
东南卫视,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228269/42329228.smil/index.m3u8?fmt=ts2hls
广西卫视,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228290/42329167.smil/index.m3u8?fmt=ts2hls
河北卫视,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228278/42329212.smil/index.m3u8?fmt=ts2hls
山西卫视,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228291/42329192.smil/index.m3u8?fmt=ts2hls
陕西卫视,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228272/42329208.smil/index.m3u8?fmt=ts2hls
兵团卫视,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228419/44198443.smil/index.m3u8?fmt=ts2hls
贵州卫视,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228300/42329165.smil/index.m3u8?fmt=ts2hls
青海卫视,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228287/42329203.smil/index.m3u8?fmt=ts2hls
河南卫视,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228309/42329216.smil/index.m3u8?fmt=ts2hls
宁夏卫视,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228284/42329159.smil/index.m3u8?fmt=ts2hls
甘肃卫视,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228288/42329156.smil/index.m3u8?fmt=ts2hls
吉林卫视,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228275/42329196.smil/index.m3u8?fmt=ts2hls
旅游卫视,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228294/42329198.smil/index.m3u8?fmt=ts2hls
内蒙古卫视,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228339/42329883.smil/index.m3u8?fmt=ts2hls
新疆卫视,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228326/42329879.smil/index.m3u8?fmt=ts2hls
西藏卫视,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228345/42330007.smil/index.m3u8?fmt=ts2hls
云南卫视,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228303/42329168.smil/index.m3u8?fmt=ts2hls
中国教育-1,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228285/42329224.smil/index.m3u8?fmt=ts2hls
好易购HD,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228561/58960440.smil/index.m3u8?fmt=ts2hls
杭州房产,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228584/59463466.smil/index.m3u8?fmt=ts2hls
漫游世界,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228581/59463297.smil/index.m3u8?fmt=ts2hls
炫动3D,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228578/59463454.smil/index.m3u8?fmt=ts2hls
高清娱乐,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228575/59463282.smil/index.m3u8?fmt=ts2hls
电子竞技,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228572/59463316.smil/index.m3u8?fmt=ts2hls
炫动卡通,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221229065/index.m3u8
山东教育,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228999/index.m3u8
动作电影,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221229034/index.m3u8
动画王国,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221228998/index.m3u8
金牌综艺,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221229002/index.m3u8
惊悚悬疑,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221229001/index.m3u8
明星大片,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221229005/index.m3u8
军事评论,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221229008/index.m3u8
古装剧场,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221229011/index.m3u8
爱情喜剧,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221229014/index.m3u8
精品电影,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221229010/index.m3u8
精品大剧,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221229017/index.m3u8
精品纪录,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221229013/index.m3u8
精品体育,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221229026/index.m3u8
军旅剧场,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221229004/index.m3u8
家庭剧场,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221229007/index.m3u8
海外剧场,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221229062/index.m3u8
健康有约,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221229016/index.m3u8
农业致富,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221229029/index.m3u8
完美游戏,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221229059/index.m3u8
世界搏击,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221229041/index.m3u8
中国功夫,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221229019/index.m3u8
潮妈辣婆,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221229031/index.m3u8
风尚购物,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221229025/index.m3u8
家有购物,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221229044/index.m3u8
炫舞未来,http://hwltc.tv.cdn.zj.chinamobile.com/PLTV/88888888/224/3221229155/index.m3u8

在Windows Server 上搭建Shadowsocks服务器

这里是在windows上搭建Shadowsocks服务器,使用的是github上的libQtShadowsocks项目。
项目地址:https://github.com/shadowsocks/libQtShadowsocks

准备

一台可以翻墙的windows。

下载libQtShadowsocks

https://github.com/shadowsocks/libQtShadowsocks/releases下载一个已经编译好的版本,这里是shadowsocks-libqss-v2.0.2-win64.7z。
下载后解压到任意位置,里面就一个shadowsocks-libqss.exe文件。

配置文件

在解压目录下创建2个文件,一个config.json,一个shadowsocks-server.bat。
config.json放置配置信息。
内容如下:

1
2
3
4
5
6
7
8
9
10
11
{
“server”:”0.0.0.0″,
“server_port”:8023,
“local_address”:”127.0.0.1″,
“local_port”:1080,
“password”:”password”,
“timeout”:600,
“method”:”aes-256-cfb”,
“http_proxy”: false,
“auth”: false
}

配置说明:
server
the address your server listens(服务器IP)
local_address
the address your local listens(本地代理地址)
local_port
local port(本地代理端口)(写之前创建的ss的端口)
port_password
password used for encryption(自己设定的服务器端口和密码)(自己可以随便设定)
timeout
in seconds(超时断开,以秒为单位)
method
default: “aes-256-cfb”, see Encryption(加密方式)
fast_open
use TCP_FASTOPEN, true / false(是否使用TCP)
workers
number of workers, available on Unix/Linux(这个只在Unix和Linux下有用,可不设置)。

shadowsocks-server.bat内容如下:

1
2
@echo off
shadowsocks-libqss.exe -c config.json -S

运行Shadowsocks服务

直接运行shadowsocks-server.bat即可运行Shadowsocks服务,你也可以在命令提示符进入软件目录,运行shadowsocks-libqss.exe -c config.json -S这行命令。

客户端配置

这里使用的客户端为Shadowsocks,github地址:https://github.com/shadowsocks/shadowsocks-windows

注意:要以PAC模式运行,如果选择全局模式,所有的访问都会使用shadowsocks;如果选择了PaC模式,则只有pac.txt中的网址才会使用shadowsocks。

注意防火墙开通相应的端口。

自定义规则

参考:http://honglu.me/2015/06/26/ShadowSocks%E8%87%AA%E5%AE%9A%E4%B9%89%E8%A7%84%E5%88%99/
从网上查阅的资料
编辑FGWList的用户规则


但我本地最后从FGWList更新本地pac时报错了

所以我是直接修改的pac.txt文件,在其中加入你想使用shadowsocks访问的网址,最后选择使用PAC模式即可。

多用户

如果希望多个用户使用shadowsocks服务,使用下面的配置替换password:xxx部分。

1
2
3
4
5
6
“port_password”: {
“8381”: “foobar1”,
“8382”: “foobar2”,
“8383”: “foobar3”,
“8384”: “foobar4”
},

问题

更新于2018-05-31.
某天shadowsocks服务不能使用了。
server端日志:

1
2
3
4
5
6
7
8
9
10
11
12
2018-05-31 16:15:41.382 INFO: Connecting clients1.google.com:443 from 183.62.174.53:48977
2018-05-31 16:15:44.649 INFO: Connecting clients1.google.com:443 from 183.62.174.53:49021
2018-05-31 16:15:44.665 INFO: Connecting clients1.google.com:443 from 183.62.174.53:49032
2018-05-31 16:15:50.803 INFO: Connecting clients1.google.com:443 from 183.62.174.53:49103
2018-05-31 16:15:56.177 INFO: Connecting www.google.com:443 from 183.62.174.53:49199
2018-05-31 16:15:56.185 INFO: Connecting www.google.com:443 from 183.62.174.53:49200
2018-05-31 16:16:11.364 DEBUG: Local socket: The remote host closed the connection
2018-05-31 16:16:14.637 DEBUG: Local socket: The remote host closed the connection
2018-05-31 16:16:14.654 DEBUG: Local socket: The remote host closed the connection
2018-05-31 16:16:20.794 DEBUG: Local socket: The remote host closed the connection
2018-05-31 16:16:26.164 DEBUG: Local socket: The remote host closed the connection
2018-05-31 16:16:26.172 DEBUG: Local socket: The remote host closed the connection

更换了算法、端口还是不行,客户端更新版本也不行,最后更新服务端版本后ok了。这里使用的版本是:shadowsocks-libqss-v2.0.2-win64.7z。

PS:有问题先看看github上相关的Issues。

手動解除 fail2ban 封鎖的 IP

假設以下是已經被 ban 的 iptables 清單

iptables --list
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
f2b-sshd   tcp  --  anywhere             anywhere             multiport dports ssh
f2b-sshd   tcp  --  anywhere             anywhere             multiport dports ssh
f2b-sshd   tcp  --  anywhere             anywhere             multiport dports ssh
f2b-sshd   tcp  --  anywhere             anywhere             multiport dports ssh

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         

Chain f2b-sshd (4 references)
target     prot opt source               destination         
REJECT     all  --  112.11.11.11        anywhere             reject-with icmp-port-unreachable
RETURN     all  --  anywhere             anywhere            
RETURN     all  --  anywhere             anywhere            
RETURN     all  --  anywhere             anywhere            
RETURN     all  --  anywhere             anywhere    
#删除在f2b-sshd中的第一条
iptables -D f2b-sshd 1

iptables --list
iptables-save

重新載入讓設定生效

service fail2ban reload

Linux Start Restart and Stop The Cron or Crond Service

Commands for RHEL/Fedora/CentOS/Scientific Linux user

If you are using Redhat (RHEL)/Fedora/CentOS Linux use the following commands.

Task: Start cron service

To start the cron service, use:
# /etc/init.d/crond start
OR RHEL/CentOS 5.x/6.x user:
# service crond start
OR RHEL/Centos Linux 7.x user:
# systemctl start crond.service

Task: Stop cron service

To stop the cron service, use:
# /etc/init.d/crond stop
OR RHEL/CentOS 5.x/6.x user:
# service crond stop
OR RHEL/Centos Linux 7.x user:
# systemctl stop crond.service

Task: Restart cron service

To restart the cron service, use:
# /etc/init.d/crond restart
OR RHEL/CentOS 5.x/6.x user:
# service crond restart
OR RHEL/Centos Linux 7.x user:
# systemctl restart crond.service

Commands for Ubuntu/Mint/Debian based Linux distro

If you are using Debian or Ubuntu or Mint Linux the following commands.

Task: Debian Start cron service

To start the cron service, use:
# /etc/init.d/cron start
OR
$ sudo /etc/init.d/cron start
OR
$ sudo service cron start

Task: Debian Stop cron service

To stop the cron service, use:
# /etc/init.d/cron stop
OR
$ sudo /etc/init.d/cron stop
OR
$ sudo service cron stop

Task: Debian Restart cron service

To restart the cron service, use:
# /etc/init.d/cron restart
OR
$ sudo /etc/init.d/cron restart
OR
$ sudo service cron restart

Task : Start the cron service at boot time

It is recommended that you start the service at boot time so that job can run w/o problems.

If you are using Redhat (RHEL)/Fedora Core/Cent OS Linux use the following commands to ensure that the service remains enabled after a reboot:
# chkconfig crond on
You can use a text based GUI tool called ntsysv to enable crond service:
# ntsysv

If you are using Debian or Ubuntu Linux use the following commands to ensure that the service remains enabled after a reboot:
# rcconf
OR
$ sudo rcconf
You can use command line tool update-rc.d:
# update-rc.d cron defaults
OR
$ sudo update-rc.d cron defaults

Centos7 配置静态路由

# 在centos7中配置如下:  

临时配置的方法:  

  172.168.10.0/24 主机配置:

ip route add 172.168.20.0/24 via 172.168.10.254 dev ens4  
 # 当eno4接口访问172.168.20.0/24 网络请转到 172.168.10.254 接口
   172.168.20.0/24 主机配置:  

ip route add 172.168.10.0/24 via 172.168.20.254 dev eno4  
当 eno4 接口访问172.168.10.0/24 网络请转到 172.168.20.254 接口
如上分别在两个不同网段主机上配置后,两台主机才会互联互通。
在 Centos7配置永久生效方式如下:  

    # cat /etc/sysconfig/network-scripts/route-ens4 
    172.168.20.0/24 via 172.168.10.254 dev eno4

    需要手动创建一个配置文件 route-网卡名,内容为临时配置 add 后面的内容,另一台主机同样的方式进行配置。

oracle申请

https://www.v2ex.com/t/601572

https://www.bobobk.com/612.html

活动地址

https://www.oracle.com/cn/cloud/free/

后台登录

https://console.ap-tokyo-1.oraclecloud.com (区域选择日本登录地址)
https://console.ap-seoul-1.oraclecloud.com (区域选择韩国登录地址)
https://console.us-phoenix-1.oraclecloud.com (区域选择美西登录地址)

将下面代码中的第一句中的Vicer改为自己将要设置的密码. 否则默认root密码为Vicer.
创建instance时,点击add launch script,将下列代码复制进去(注意更改root密码).

!/bin/bash
echo root:password |sudo chpasswd root
sudo sed -i 's/^#\?PermitRootLogin./PermitRootLogin yes/g' /etc/ssh/sshd_config; 
sudo sed -i 's/^#\?PasswordAuthentication./PasswordAuthentication yes/g' /etc/ssh/sshd_config;
sudo reboot


对于EC2,GCE等机器也可以使用. 不能添加代码的机器,可以登录进ssh,再执行上面的代码. 也可以开启root登陆.