ngrok 编译服务器客户端设置

服务端编译需要go1.6+, 下载源码

git clone https://github.com/inconshreveable/ngrok.git ngrok
cd ngrok
生成证书

NGROK_DOMAIN="xxxx.com"
openssl genrsa -out base.key 2048
openssl req -new -x509 -nodes -key base.key -days 10000 -subj "/CN=$NGROK_DOMAIN" -out base.pem
openssl genrsa -out server.key 2048
openssl req -new -key server.key -subj "/CN=$NGROK_DOMAIN" -out server.csr
openssl x509 -req -in server.csr -CA base.pem -CAkey base.key -CAcreateserial -days 10000 -out server.crt
cp base.pem assets/client/tls/ngrokroot.crt
编译, 完成后ngrok和ngrokd位于bin下
sudo make release-server release-client
启动服务器
sudo ./bin/ngrokd -tlsKey=server.key -tlsCrt=server.crt -domain="xxxx.com" -httpAddr=":8081" -httpsAddr=":8082"
32位或者arm客户端再编译, 位于bin下的Linux_arm下

…more

rhel 7 配置 samba

安装程序并添加用户 sudo yum install samba samba-client samba-common sudo smbpasswd -a user 修改/etc/samba/smb.conf文件

workgroup = WORKGROUP

[share]
path = /home/share
browseable = yes
writable = yes
valid usrs = user
create  mask =  644 
directory mask =  770

启动服务加入开机启动

# systemctl enable smb
# systemctl enable nmb
# systemctl start smb
# systemctl start nmb
# firewall-cmd --permanent --add-service=samba
# firewall-cmd --reload

测试 smbclient -L hostname/IP

owncloud及samba

安装samba

sudo apt-get install samba
sudo apt-get install samba-common-bin

必须安装common-bin才能利用smbpasswd进行samba用户管理 添加用户必须属于linux用户

sudo smbpasswd -a user

修改/etc/samba/smb.conf文件,最后添加以下代码

[share]
path = /home/share
browseable = yes
writable = yes
valid usrs = user
create mask = 644
directory mask = 770

onwcloud安装完后如需修改数据文件夹,可以删除owncloud安装目录下config/config.php文件,重置账号和数据

繁殖的微景观

微景观到了春天开始繁殖了,苔藓很快就要覆盖龙猫家族了

download

DD-WRT上openvpn客户端的设置

logo主要根据这篇文章进行设置,命令行操作,简单快速,但是这篇文章没有加入dh文件,所以稍作修改。最后firewall设置中的IP也应该根据自己的服务器设置。

进入DD-WRT界面,点击administration -> commands,将以下代码贴进代码框,修改红色部分,替换成自己的服务器IP和端口。用文本编辑器(如emeditor等)打开相应的证书和key,贴入到代码框对应位置。点击save startup。…more