Archive

Archive for May, 2016

ngrok 编译服务器客户端设置

May 22nd, 2016 No comments

服务端编译需要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下

Read more…

Categories: 电脑网络|network Tags: ,

rhel 7 配置 samba

May 20th, 2016 No comments

安装程序并添加用户

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
Categories: 电脑网络|network Tags: ,