首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >网络驱动器数据安全-如何限制访问

网络驱动器数据安全-如何限制访问
EN

Ask Ubuntu用户
提问于 2016-11-11 04:52:00
回答 1查看 157关注 0票数 0

我有一台Ubuntu机器。我在wifi网络上通过samba与三台windows机器共享数据,并希望限制其他可以访问该数据的Windows机器。

例如,如果有人用Windows机器连接到我的wifi网络,然后转到网络选项,然后映射网络驱动器并进入Ubuntu机器的网络路径,那么他/她就可以访问Ubuntu驱动器。我想限制那些机器进入我的驱动器。

EN

回答 1

Ask Ubuntu用户

发布于 2016-11-11 04:57:44

您可以通过这样编辑/etc/samba/smb.conf来限制IP的访问:

代码语言:javascript
复制
[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.
...

记得用你自己的网络信息编辑上面的内容。

  • 将eth0更改为您的网络接口。例如,我的是enp3s0
  • 更改hosts allow =行以匹配您希望访问共享的机器的IP地址。
票数 1
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/848067

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档