我刚刚在CentOS 7服务器上完成了OpenVPN的安装,并且已经成功连接。我检查了我的公共IP地址,它是远程服务器IP。
但是我仍然无法从Windows客户端浏览该服务器上的文件夹。我想我需要激活一些共享的东西或更改工作组或更改某些设置,但是我不知道。
因此,我在这里寻求帮助:如何通过VPN访问网络资源?
我不想使用Samba,因为我相信没有它也可以做到。
我正在使用OpenVPN Web界面
/etc/sysctl.conf
:
# System default settings live in /usr/lib/sysctl.d/00-system.conf.
# To override those settings, enter new settings here, or in an /etc/sysctl.d/<name>.conf file
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
# Added By Me
# Recycle Zombie connections
net.inet.tcp.fast_finwait2_recycle=1
net.inet.tcp.maxtcptw=200000
# Increase number of files
kern.maxfiles=65535
kern.maxfilesperproc=16384
# Increase page share factor per process
vm.pmap.pv_entry_max=54272521
vm.pmap.shpgperproc=20000
# Increase number of connections
vfs.vmiodirenable=1
kern.ipc.somaxconn=3240000
net.inet.tcp.rfc1323=1
net.inet.tcp.delayed_ack=0
net.inet.tcp.restrict_rst=1
kern.ipc.maxsockbuf=2097152
kern.ipc.shmmax=268435456
# Host cache
net.inet.tcp.hostcache.hashsize=4096
net.inet.tcp.hostcache.cachelimit=131072
net.inet.tcp.hostcache.bucketlimit=120
# Increase number of ports
net.inet.ip.portrange.first=2000
net.inet.ip.portrange.last=100000
net.inet.ip.portrange.hifirst=2000
net.inet.ip.portrange.hilast=100000
kern.ipc.semvmx=131068
# Disable Ping-flood attacks
net.inet.tcp.msl=2000
net.inet.icmp.bmcastecho=1
net.inet.icmp.icmplim=1
net.inet.tcp.blackhole=2
net.inet.udp.blackhole=1
# Mysql conf
You're misunderstanding that Windows can't natively just "browse" a Linux filesystem, and when networking is involved you need a protocol so that the two devices can communicate with each other using the same language.
Honestly, you are best off installing either of the following:
Samba - so that you can create some read/write shares on your Centos 7 box and then you can natively connect to the shares through Windows. You need to configure the shares/folders that can be accessed but you can't view the whole Centos filesystem (i.e. being able to view everything under /
). Well, you can, but it would be the most stupid idea. Additionally, Samba allows you to open remote files by double-clicking and the local associated application will open the file to allow for editing/saving back to the remote location.
OR
SSH服务器-如果在Centos机器上安装SSH服务器,则可以在Windows机器上使用WinSCP之类的客户端,并(取决于登录到远程服务器的帐户)访问远程文件系统。如果将远程文件下载到本地文件夹然后打开文件(无论如何执行),WinSCP的效果最佳,并且只能本地打开文本文件。二进制文件要复杂一些。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句