Linux搭建VNC,以及使用novnc
远程桌面连接VNC(Virtual Network Computing)
协议是通用的和系统无关
以下用mac连接centos
工具主要工具是Xvnc,在其上层的脚本有vncserver
123456789# CentOS# 安装桌面环境dnf groupinstall "Server with GUI"dnf install tigervnc-server# Ubuntuapt install xserver-xorg-coreapt install tigervnc-standalone-server tigervnc-xorg-extension# Archpacman -S tigervnc
配置
添加vnc用户,设置密码
123456# 设置密码vncpasswd# 启动vnc服务vncserver # vncserver :0(set display to :0)# ubuntu默认localhost无法从外网访问解决方法vncserver -localhost no
允许使用剪切板
编辑$home/admin/.vnc ...
自建VPN服务
创建vpn服务器用PPTP/L2TP创建vpn服务
想要使用vpn将多台公网服务器共同组建成局域网服务器
PPTP工具1dnf install pptpd
配置
ip配置
编辑/etc/pptpd.conf localip是服务器的局域网ip remoteip是客户端的局域网ip
12localip 192.168.0.1remoteip 192.168.0.100-200
用户配置
编辑/etc/ppp/chap-secrets 其中*表示任意ip
1234# client server passwd ipclient1 pptpd 123 *client2 pptpd 223 *client3 pptpd 323 *
重启pptpd服务
1systemctl restart pptpd
允许转发数据包(IP packet forwarding)
12345vim /etc/sysctl.conf# add the followingnet.ipv4.ip_forward = 1# enable itsysct ...
网站开源模块汇总
网页模块查找技术已经成型的开源网页模块
登录与验证(authentication)
Auth0
SuperTokens
authentik
OpenIAM
论坛(forum)
NodeBB
MyBB
phpBB
discourse
flarum
博客(blog)
Ghost
hexo
jekyll
WordPress
文档编辑(editor)
etherpad
OnlyOffice
Collabora Online
firepad
网页服务平台
web hosting云建站
新技术新技术使用nodejs,python等技术,创建的站点也更加灵活
获取站点权限,可以使用docker,wetty等
vercel可以从github导入网站,支持各种js框架
netlify支持从git型导入网站,支持添加自定义域名
streamlitrenderEvenNodeCyclicheroku可以将应用部署到该网站,2022.11.28收费
旧技术旧技术一般是静态建站,使用了PHP相关技术较多
当然使用php技术的站点,都可以尝试取系统权限
参考phpshell
wordpress免费站点都是广告,基本无法使用
x10hosting免费部署网站,提供mysql数据库
wid同wordpress,只能写page
PHP webshell 漏洞
webshells通过PHP脚本获取webshell
PHP函数system()1234<?php// Return the user the script is running undersystem("whoami");?>
exec()123456789101112131415<?php// Executes but returns nothingexec("ls -la");?><?php// Executes, returns only last line of the outputecho exec("ls -la");?><?php// Executes, returns the output in an arrayexec("ls -la",$array);print_r($array);?>
shellexec()1234<?php// Executes, returns the entire output as a string ...
建立webssh服务
webssh通过网页http协议ssh登录获取终端
最终效果通过域名shell.jumhorn.eu.org访问网页ssh客户端
安装1pip3 install webssh
配置使用nginx反向代理
123456789101112131415server { listen 80; server_name shell.jumhorn.eu.org; location / { proxy_pass http://127.0.0.1:8888; proxy_http_version 1.1; proxy_read_timeout 300; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-PORT $remote_port; ...
nginx_redirect
nginx跳转带来的问题记录一次实战配置中nginx自动跳转带来的问题,以及该问题的发现与分析
nginx配置如下nginx作为流量分发,对于443端口同时支持ssh和https服务
web服务是配置的/vscode访问后端服务
stream配置
12345678910111213# SNI 分流stream { map $ssl_preread_server_name $name { ssh.jumhorn.com 127.0.0.1:22; default 127.0.0.1:8880; } server { listen 443; proxy_pass $name; ssl_preread on; }}
http模块内部server配置
123456789101112131415161718server { listen 127.0.0.1:8880 ssl; server_name jumhorn.com www.jumhorn ...
gitlab创建远程开发环境,将gitlab作为前端
GitLab Remote Developmentgithub,gitlab都支持webide,但是使用webide时无法使用shell命令,
恰好由于gitlab支持远程开发,所以将vps算力提供给gitlab,是的webide可以编译,调试
工具
https://docs.gitlab.com/ee/user/project/remote_development/
gitlab直接使用docker部署
配置
申请域名证书
开启docker镜像
获取token1docker exec my-environment cat TOKEN
使用
打开任意webide
连接 domain.com:3443
FAQ目前没有给出源码,只给出了docker部署
exited (134)
在centos上跑ubuntu docker,node报错ulimit,要更新版本,我使用的是aliyun的centos就没再折腾了