Xvnc 支持libwrap控制单个IP登录VNC 实现
2014-07-21 18:22
513 查看
0, download tightvnc-server
wget http://www.tightvnc.com/download/1.3.10/tightvnc-1.3.10_unixsrc.tar.gz
1, 修改配置文件,支持libwrap 库
cd /root/vnc_unixsrc/Xvnc/programs/Xserver
vim Imakefile
158 LIBWRAP=-lwrap
159 #if SystemV4 || defined(SGIArchitecture) || UseRgbTxt
160 SYSLIBS = ${LIBWRAP} $(ZLIB) MathLibrary Krb5Libraries $(EXTRASYSLIBS)
161 #else
162 SYSLIBS = ${LIBWRAP} $(ZLIB) MathLibrary Krb5Libraries DBMLibrary $(EXTRASYSLIBS)
163 #endif
164 CBRT = mi/LibraryTargetName(cbrt)
165 STDDIRS = include dix os mi $(XPDDXDIR) $(EXTDIRS)
2, cd //root/vnc_unixsrc/Xvnc/programs/Xserver/hw/vnc/
vim Imakefile
17 DEFINES = ServerOSDefines -DUSE_LIBWRAP=1
2, 编译安装:
1, xmkmf
2, make World
3, cd Xvnc
4, ./configure
5, make
6, make install
7, cd ../
8, ./vncinstall /usr/local/bin /usr/local/man
9, mkdir -p /usr/local/vnc/classes
10, cp classes/* /usr/local/vnc/classes
11, cd /usr/X11R6/lib/
12, ln -s /usr/share/X11/ ./
3, 基本配置
VNCSERVERS="1:root"
VNCSERVERARGS[1]="-geometry 1024x768"
4,设置密码
vncpasswd
#输入密码
5, 启动程序
Xvnc :1 -desktop X -httpd /usr/local/vnc/classes -auth /root/.Xauthority -geometry 1024x768 -depth 24 -rfbwait 120000 -rfbauth /root/.vnc/passw
6, 验证配置与测试
vim /etc/hosts.deny
Xvnc:ALL:deny
vim /etc/hosts.allow
Xvnc:192.168.22.*:allow
7, 日志记录
1,成功拒绝登录IP
22/07/14 02:10:17 Rejected connection from client 192.168.222.1
2,成功连接IP
22/07/14 02:10:50 Got connection from client 192.168.222.1
22/07/14 02:10:50 Using protocol version 3.8
22/07/14 02:10:50 Enabling TightVNC protocol extensions
8, Error 处理
09/07/09 11:09:24 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t
09/07/09 11:09:24 Listening for VNC connections on TCP port 5901
09/07/09 11:09:24 Listening for HTTP connections on TCP port 5801
09/07/09 11:09:24 URL http://localhost:5801 Font directory '/usr/X11R6/lib/X11/fonts/misc/' not found - ignoring
Font directory '/usr/X11R6/lib/X11/fonts/Speedo/' not found - ignoring
Font directory '/usr/X11R6/lib/X11/fonts/Type1/' not found - ignoring
Font directory '/usr/X11R6/lib/X11/fonts/75dpi/' not found - ignoring
Font directory '/usr/X11R6/lib/X11/fonts/100dpi/' not found - ignoring
Fatal server error:
could not open default font 'fixed'
解决办法:
11, cd /usr/X11R6/lib/
12, ln -s /usr/share/X11/ ./
9, 参考文档 http://www.realvnc.com/pipermail/vnc-list/1998-September/002635.html
wget http://www.tightvnc.com/download/1.3.10/tightvnc-1.3.10_unixsrc.tar.gz
1, 修改配置文件,支持libwrap 库
cd /root/vnc_unixsrc/Xvnc/programs/Xserver
vim Imakefile
158 LIBWRAP=-lwrap
159 #if SystemV4 || defined(SGIArchitecture) || UseRgbTxt
160 SYSLIBS = ${LIBWRAP} $(ZLIB) MathLibrary Krb5Libraries $(EXTRASYSLIBS)
161 #else
162 SYSLIBS = ${LIBWRAP} $(ZLIB) MathLibrary Krb5Libraries DBMLibrary $(EXTRASYSLIBS)
163 #endif
164 CBRT = mi/LibraryTargetName(cbrt)
165 STDDIRS = include dix os mi $(XPDDXDIR) $(EXTDIRS)
2, cd //root/vnc_unixsrc/Xvnc/programs/Xserver/hw/vnc/
vim Imakefile
17 DEFINES = ServerOSDefines -DUSE_LIBWRAP=1
2, 编译安装:
1, xmkmf
2, make World
3, cd Xvnc
4, ./configure
5, make
6, make install
7, cd ../
8, ./vncinstall /usr/local/bin /usr/local/man
9, mkdir -p /usr/local/vnc/classes
10, cp classes/* /usr/local/vnc/classes
11, cd /usr/X11R6/lib/
12, ln -s /usr/share/X11/ ./
3, 基本配置
VNCSERVERS="1:root"
VNCSERVERARGS[1]="-geometry 1024x768"
4,设置密码
vncpasswd
#输入密码
5, 启动程序
Xvnc :1 -desktop X -httpd /usr/local/vnc/classes -auth /root/.Xauthority -geometry 1024x768 -depth 24 -rfbwait 120000 -rfbauth /root/.vnc/passw
6, 验证配置与测试
vim /etc/hosts.deny
Xvnc:ALL:deny
vim /etc/hosts.allow
Xvnc:192.168.22.*:allow
7, 日志记录
1,成功拒绝登录IP
22/07/14 02:10:17 Rejected connection from client 192.168.222.1
2,成功连接IP
22/07/14 02:10:50 Got connection from client 192.168.222.1
22/07/14 02:10:50 Using protocol version 3.8
22/07/14 02:10:50 Enabling TightVNC protocol extensions
8, Error 处理
09/07/09 11:09:24 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t
09/07/09 11:09:24 Listening for VNC connections on TCP port 5901
09/07/09 11:09:24 Listening for HTTP connections on TCP port 5801
09/07/09 11:09:24 URL http://localhost:5801 Font directory '/usr/X11R6/lib/X11/fonts/misc/' not found - ignoring
Font directory '/usr/X11R6/lib/X11/fonts/Speedo/' not found - ignoring
Font directory '/usr/X11R6/lib/X11/fonts/Type1/' not found - ignoring
Font directory '/usr/X11R6/lib/X11/fonts/75dpi/' not found - ignoring
Font directory '/usr/X11R6/lib/X11/fonts/100dpi/' not found - ignoring
Fatal server error:
could not open default font 'fixed'
解决办法:
11, cd /usr/X11R6/lib/
12, ln -s /usr/share/X11/ ./
9, 参考文档 http://www.realvnc.com/pipermail/vnc-list/1998-September/002635.html
相关文章推荐
- 远程控制软件VNC教程和对内网机器控制的实现
- asp.net基业控制登录简单实现
- 实现“记录用户登录时间和退出时间,同时记录用户IP,并且要记录用户IP对应的省和城市地址”
- HttpModule实现系统IP访问控制
- Linux下使用SSH和VNC实现图形化远程控制(Ubuntu 9.04环境)
- 利用websm和vnc实现远程控制HMC
- VNC实现远程桌面控制
- ASP.NET 框架 之HttpModule 例程:实现登录控制和权限控制
- sqlsever2005限指定IP访问数据库--登录触发器实现
- Yahoo支持OpenID技术实现单点登录
- IP视频监控系统中云台控制模块的设计与实现 (转)
- 一个支持各种交叉等形状工业控制管道控件的实现
- ASP.NET 框架 之HttpModule 例程:实现登录控制和权限控制
- 实现“记录用户登录时间和退出时间,同时记录用户IP,并且要记录用户IP对应的省和城市地址”
- 如何用路由器实现基于用户/IP的流量控制
- 远程控制软件VNC教程和对内网机器控制的实现
- 远程控制软件VNC教程和对内网机器控制的实现
- 用VNC实现远程桌面共享(支持Windows, Linux, …)
- 远程控制软件VNC教程和对内网机器控制的实现