OpenVPN Win7 Bridge环境备忘

OpenVPNwin7备忘1.端口,不要用1194,这个是默认端口,我设置好了,结果不到5分钟就不好用了。换了端口就没问题了。2.路由还是桥接,我花了2天的时间去配路由也没成功。换桥接方式,1个小时搞定。Windows下配路由资料少。还是桥接简单。路由方式客户端被分配一个独立的私有网段的IP。桥接方式客户端被分配的IP就是服务器所在网段的IP,用起来方便。3.配置方法,桥接。3.1服务器,按照http://www.pavelec.net/adam/openvpn/bridge/的方法将OpenVPN的虚拟网卡和服务器的物理网卡做桥接。注意:不能在远程做。因为做完桥接,原来的物理网卡就不能用了,要使用桥接后生成的网卡,而这个网卡的IP会变,所以远程连接会断。3.2上面的教程后半段的服务器和客户端的配置在我的环境里不好用。我看OpenVPN自带教程(HOWTO)http://openvpn.net/index.php/open-source/documentation/howto.html服务器的配置文件用例子server.ovpn修改下面几个地方(例子在C:\ProgramFiles\OpenVPN\sample-config目录下)###############################port1194=>port<newport>devtun=>devtapserver10.8.0.0255.255.255.0=>;server10.8.0.0255.255.255.0;server-bridge10.8.0.4255.255.255.010.8.0.5010.8.0.100=>server-bridge192.168.200.201255.255.255.0192.168.200.90192.168.200.99;201是VPN服务器IP,90-99是将要分配给客户端的IP段;client-to-client=>client-to-client###############################这个文件放到C:\ProgramFiles\OpenVPN\config目录下ca.crt,server.crt,server.key,dh1024.pem4个文件也放到相同目录下。文件生成方法看HOWTO的SettingupyourownCertificateAuthority(CA)andgeneratingcertificatesandkeysforanOpenVPNserverandmultipleclients3.2客户端用C:\ProgramFiles\OpenVPN\sample-config\client.ovpn文件修改以下地方###############################devtun=>devtapremotemy-server-11194=>remote<serverhostnameorIP><newserverport>;这个是服务器的真实IP,如果服务器是通过路由器接到网络上的,需要填路由器在公网的IP,然后在路由器上做虚拟服务器。把路由器的端口映射到内网的VPNServer的对应端口上。certclient.crtkeyclient.key=>certclient1.crtkeyclient1.key###############################client.ovpn放到客户端的C:\ProgramFiles\OpenVPN\config\目录下ca.crt,client1.crt,client1.key3个文件放到相同目录下4.运行服务器,在server.ovpn文件上点右键,选StartOpenVPNonthisconfigfile如果成功,会打印WedSep0115:29:282010InitializationSequenceCompleted这一行客户端,同样在client.ovpn上点右键选StartOpenVPNonthisconfigfile成功后会打印WedSep0115:29:282010InitializationSequenceCompleted在客户端用ipconfig命令可以看到有一块网卡分配了192.168.200.90这个IPping192.168.200.201可以ping通服务器自动运行看HOWTO的ConfiguringOpenVPNtorunautomaticallyonsystemstartup客户端可以用OpenVPNGUI启动

让Windows XPSP3支持Network Level Authentication

https://support.soundenterprises.net/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=221WhenconnectingtoaWindows7usingremotedesktopfromaWindowsXPclientrunningservicepack2orearlier,yougetthefollowingerrormessage:TheremotecomputerrequiresNetworkLevelAuthentication,whichyourcomputerdoesnotsupport.ToenableNLAinXPmachines;firstinstallXPSP3,thenedittheregistrysettingsontheXPclientmachinetoallowNLA•ConfigureNetworkLevelAuthentication1.ClickStart,clickRun,typeregedit,andthenpressENTER.2.Inthenavigationpane,locateandthenclickthefollowingregistrysubkey:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa3.Inthedetailspane,right-clickSecurityPackages,andthenclickModify.4.IntheValuedatabox,typetspkg.LeaveanydatathatisspecifictootherSSPs,andthenclickOK.5.Inthenavigationpane,locateandthenclickthefollowingregistrysubkey:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders6.Inthedetailspane,right-clickSecurityProviders,andthenclickModify.7.IntheValuedatabox,typecredssp.dll.LeaveanydatathatisspecifictootherSSPs,andthenclickOK.8.ExitRegistryEditor.9.Restartthecomputer.

某些媒体真龌龊

观最近郭德纲事件有感。媒体利用舆论优势,剪切视频,颠倒是非,忽悠群众,误导大众。就连郭德纲的原话都能被他们剪成完全相反的意思。丑恶嘴脸一览无余。这是媒体龌龊的证据http://v.iqilu.com/content/index/308876,看13分钟这是有人在网上放的完整视频http://www.56.com/u76/v_NTQwNTE0MjU.html

VC编译遇到的两个问题

1bstrerrorLNK2019:无法解析的外部符号char*__stdcall_com_util::ConvertBSTRToString(wchar_t*)的解决办法Settingoftheprojectin”C/C++->Language->Treatwchar_tasBuilt-InType”to”No”(originallyitwas:”Yes(/Zc:wchar_t)”.2无法打开文件”LIBC.lib”解决办法解决:在“配置属性->链接器->输入->忽略特定库”后填入“LIBC.lib”。  LIBC.lib介绍  google一下,libc.lib原来是被遗弃的可怜家伙。MSDNLabs:What”sNewinVisualC++2005Quote:Thesingle-threadedCRTlibraries,,msvcrt.lib,andmsvcrtd.lib,.Usethemulti-threadedCRTlibraries.The/MD,/ML,/MT,/LD(UseRun-TimeLibrary)compilerflagisnolongersupported.Non-lockingversionsofsomefunctionshavebeenaddedincaseswheretheperformancedifferencebetweenthemultithreadedcodeandthesingle-threadedcodeispotentiallysignificant.要解决问题的话,只要在链接设置那里忽略它就没问题了。文章出处:飞诺网www.firnow.com):http://dev.firnow.com/course/3_program/c++/cppsl/2008525/117866.html  

RHEL 5.x 安装之后汉字乱码问题

汉字是方块。需要改成英文界面。参考http://dev.firnow.com/course/6_system/linux/Linuxjs/20100305/196627.htmlhttp://os.51cto.com/art/200909/149362.htm1.编辑/etc/sysconfig/目录下的i18n文件,将LC_ALL=POSIX写入,保存文件  如果你在i18n文件中加入LC_ALL=POSIX,那么系统的LC_XXX就都会变为POSIX2.随之,图形界面下,也更改为英文(1),如果你使用的是KDE  #vi’whichstartkde’  编辑kde的启动脚本,在其头部加入exportLC_ALL=POSIX。(2).如果使用gnome  #whichgnome-session  查找gnome-session(gnome的启动文件)的位置,但是这个文件不是shell脚本,不能vi编辑  我们将其改名,在gnome-session的目录下  #mvgnome-sessiongnome-session.orig  #vignome-session  exportLC_ALL=POSIX  execgnome-session.orig$*  保存,退出,将这个脚本添加“执行”位  #chmod755gnome-session  就OK了。

关于汉化的几个软件

1.SDLPassolo2009通用汉化软件,在汉化新世纪下载2.脱壳,UPX-Ripper3.手工汉化,UltraEdit.在文本模式下搜索,在16进制模式下修改。千万不能在文本模式下修改,否则所有的0x00都会变成0x20(空格)4.补丁制作dUP汉化版,可以制作不CRC校验的补丁5.跟踪安装程序对注册表和系统目录做了哪些修改,tracewinstall6.制作安装程序,VNISEdit060712,还自带reg2nis7.测试,vmware,sandboxie,…

vmware鼠标乱动,linux密码,grub延时为0,…

1.把DPI设置为100%就可以解决vmware里鼠标乱飘的问题,不过win7的字体真难看,不设150%太累眼2.(忘记root密码,抄来的)以单用户方式进入系统,修改root的密码然后再重新启动即可。过程如下所示。  对于LILO:  当系统启动到出现LILO引导画面时,对于图形引导方式按TAB键进入文本方式,然后  在LILO处输入linuxsingle回车即可进入免密码的控制台,进入以后使用passwd命令修改  root的密码即可。  对于GRUB:  当系统启动到出现GRUB引导画面时,按字母e键,进入GRUB编辑状态。按键盘上或下键选  择相应的引导项,在选择了一个引导项目后接字母e键进入命令行编辑。在出现的命令行后添  加”空格single”并按回车返回编辑状态,再按字母b即可以单用户方式启动系统,进入系统后  使用passwd命令修改root的密码即可。3.grub延时为0,无法用第2条的方法(还是抄的)方案A:开机时快速不停地点按“下”键,有很大的可能出现菜单方案B:用一张Linux引导盘进入Linux,修改/boot/grub/menu.lst4.“eth0设备的MAC地址与预想的不符,忽略”在图形界面下选择eth0网卡,系统->管理->网络->设备->eth0->编辑->硬件设备->关联到MAC地址->探测5.关于vmware中linuxcannotmountlocalfilesystem的问题这个问题还是比较好解决的,在虚拟机的设置中enablesharedfolder即可。右键点击虚拟机->Setting->options->sharedfolder,看看是不是disabled的,默认是disabled的。enable它,在宿主机new一个空文件夹,在sharedfolder向导中选中它,完成,重启虚拟机即可

显示Unix上日文(ZT)

原贴地址http://www.umiacs.umd.edu/~aelkiss/xml/displaywin.htmlUnicodeonWindows我看的重点部分PuTTYPuTTYhasverygoodsupportforbothUnicodeandlegacyencodings.Tochangewhichencodingisbeingused,firstclickontheputtyiconintheupperleft-handsideofthewindowandclick”ChangeSettings…”Whereyougofromheredependsonwhatencodingyouwanttouse.UnicodeandSingle-ByteEncodingsPuTTYhasbuilt-insupportforawiderangeofencodingsincludingallISO-8859seriesencodings,Windowscodepages1250-1258,theRussianKOI8encodings,andafewothers.UnicodeUTF-8supportisalsobuilt-in.Touseoneoftheseencodings,clickon”Translation”andthenselectthedesiredencoding.Mostoftheencodingsshouldworkwell,althoughHebrewandArabicwillprobablyhavedirectionalityproblems.Putty0.55doeshavesomepreliminarysupportforright-to-leftscriptsbutIwasnotabletogetittoworkreliablyforHebrew.Arabicisevenmoreproblematic.Multi-ByteEncodings(includingChinese)Chinese,JapaneseandKoreansupportinPuTTYworksdifferentlythantheotherencodings.Youneedtochoosetheappropriatefontandthenchoose”usefontencoding”fromthetranslationmenu.Firstchoosethecorrectfont.Gotothe”Appearance”sectionandclickthe”Change”buttoninthe”FontSettings”area.Korean(WindowsCP949-EUC-KR+extensions)-ChooseBatangChe,DotimChe,GulimCheorGungsuhCheasthefont,thenHangulasthescriptJapanese(Shift-JIS)-ChooseMSGothicorMSMinchoasthefont,thenJapaneseasthescript.Chinese(Simplified)(GB2312)-ChooseNSimSunasthefont,thenCHINESE_GB2312asthescript.Chinese(Traditional)(Big5)-ChooseMingLiUasthefont,thenCHINESE_BIG5asthescript.