我有一台Ubuntu机器。我在wifi网络上通过samba与三台windows机器共享数据,并希望限制其他可以访问该数据的Windows机器。
例如,如果有人用Windows机器连接到我的wifi网络,然后转到网络选项,然后映射网络驱动器并进入Ubuntu机器的网络路径,那么他/她就可以访问Ubuntu驱动器。我想限制那些机器进入我的驱动器。
发布于 2016-11-11 04:57:44
您可以通过这样编辑/etc/samba/smb.conf来限制IP的访问:
[global]
...
# Override the default network interface list that Samba will use for browsing.
interfaces = eth0, 127.0.0.1
# Limit what interfaces on a machine will serve SMB requests.
bind interfaces only = yes
# List, IP range etc. of hosts that are not allowed to access Samba services.
# In case of conflict between 'hosts allow' and 'hosts deny', the 'allow' list will take precedence.
hosts deny = ALL
# List, IP range etc. of hosts that are allowed to access Samba services
hosts allow = 192.168.0.127.
...记得用你自己的网络信息编辑上面的内容。
enp3s0hosts allow =行以匹配您希望访问共享的机器的IP地址。https://askubuntu.com/questions/848067
复制相似问题