欢迎来到天天文库
浏览记录
ID:34465302
大小:223.00 KB
页数:21页
时间:2019-03-06
《openvpn-防火墙-安装配置文档v4》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、实用文案Server端安装、配置默认系统是没有安装openvpn,如果能连接网络,可以方便在线安装。(1)root@ubuntuOracle:~#apt-getinstallopenvpnReadingpackagelists...DoneBuildingdependencytreeReadingstateinformation...DoneThefollowingextrapackageswillbeinstalled:openvpn-blacklistSuggestedpackages:resolvconfThefollowingNEWpackageswillbeinstalled:ope
2、nvpnopenvpn-blacklist0upgraded,2newlyinstalled,0toremoveand46notupgraded.Needtoget1440kBofarchives.Afterthisoperation,3228kBofadditionaldiskspacewillbeused.Doyouwanttocontinue[Y/n]?Y(2)拷贝openvpn相应配置文件到/etc/openvpn目录下root@ubuntuOracle:/etc#cp-r/usr/share/doc/openvpn/examples/easy-rsa/2.0//etc/openvpn
3、root@ubuntuOracle:/etc#cp-r/usr/share/doc/openvpn/examples/sample-config-files/server.conf.gz/etc/openvpn(3)修改产生密码所需的参数root@ubuntuOracle:/etc/openvpn#cd2.0root@ubuntuOracle:/etc/openvpn/2.0#vivarsexportKEY_COUNTRY="CN"exportKEY_PROVINCE="FJ"exportKEY_CITY="QZ"exportKEY_ORG="SHI_JI_ZHI_CUN_VPN"export
4、KEY_EMAIL=vpn@139.com标准实用文案(4)执行该配置文件,使之生效root@ubuntuOracle:/etc/openvpn/2.0#source./varsNOTE:Ifyourun./clean-all,Iwillbedoingarm-rfon/etc/openvpn/2.0/keys查看所配置参数是否生效root@ubuntuOracle:/etc/openvpn/2.0#env
5、grepKEYKEY_EXPIRE=3650KEY_EMAIL=vpn@139.comKEY_SIZE=1024KEY_DIR=/etc/openvpn/2.0/keysKEY_CITY=Q
6、ZKEY_PROVINCE=FJKEY_ORG=SHI_JI_ZHI_CUN_VPNKEY_CONFIG=/etc/openvpn/2.0/openssl.cnfKEY_COUNTRY=CN(5)清除keys文件下密钥文件,进行初始化root@ubuntuOracle:/etc/openvpn/2.0#./clean-all(6)建立ca文件root@ubuntuOracle:/etc/openvpn/2.0#./build-caGeneratinga1024bitRSAprivatekey.++++++................++++++writingnewprivatekeyto'
7、ca.key'-----Youareabouttobeaskedtoenterinformationthatwillbeincorporatedintoyourcertificaterequest.WhatyouareabouttoenteriswhatiscalledaDistinguishedNameoraDN.TherearequiteafewfieldsbutyoucanleavesomeblankForsomefieldstherewillbeadefaultvalue,标准实用文案Ifyouenter'.',thefieldwillbeleftblank.-----CountryN
8、ame(2lettercode)[CN]:--默认回车StateorProvinceName(fullname)[FJ]:--默认回车LocalityName(eg,city)[QZ]:--默认回车OrganizationName(eg,company)[SHI_JI_ZHI_CUN_VPN]:--默认回车OrganizationalUnitName(eg,section)[]:VPN--输入VP
此文档下载收益归作者所有