如何用gufw设置只允许某个程序联网以及只拒绝某个程序联网

Web、Mail、Ftp、DNS、Proxy、VPN、Samba、LDAP 等基础网络服务
回复
alextx
帖子: 15
注册时间: 2011-07-10 1:25

如何用gufw设置只允许某个程序联网以及只拒绝某个程序联网

#1

帖子 alextx » 2015-07-23 16:59

用gufw要如何设置只允许某个程序联网以及只拒绝某个程序联网,如果gufw办不到是否有其它的办法?
meditation
帖子: 217
注册时间: 2009-10-06 21:41
系统: ARCH

Re: 如何用gufw设置只允许某个程序联网以及只拒绝某个程序联网

#2

帖子 meditation » 2015-07-24 3:52

gufw做不到。
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 如何用gufw设置只允许某个程序联网以及只拒绝某个程序联网

#3

帖子 poloshiao » 2015-07-24 7:09

用gufw要如何设置只允许某个程序联网以及只拒绝某个程序联网,如果gufw办不到是否有其它的办法?
1. https://help.ubuntu.com/community/UFW#B ... d_Examples
When you turn UFW on, it uses a default set of rules (profile) that should be fine for the average home user. That's at least the goal of the Ubuntu developers. In short, all 'incoming' is being denied, with some exceptions to make things easier for home users.
ufw 預設規則 只針對 incoming 不針對 outgoing
1-1. gufw 是 ufw 圖形前端

2. 如果要兼顧 incoming 及 outgoing
請試試 iptables
https://help.ubuntu.com/community/IptablesHowTo
2-1. ufw 是 iptables 的前端

3. 補充
http://askubuntu.com/a/45107/198920
neither netfilter nor iptables can filter per application.
They can filter by user and port but not per application.
alextx
帖子: 15
注册时间: 2011-07-10 1:25

Re: 如何用gufw设置只允许某个程序联网以及只拒绝某个程序联网

#4

帖子 alextx » 2015-07-24 16:30

poloshiao 写了:
用gufw要如何设置只允许某个程序联网以及只拒绝某个程序联网,如果gufw办不到是否有其它的办法?
1. https://help.ubuntu.com/community/UFW#B ... d_Examples
When you turn UFW on, it uses a default set of rules (profile) that should be fine for the average home user. That's at least the goal of the Ubuntu developers. In short, all 'incoming' is being denied, with some exceptions to make things easier for home users.
ufw 預設規則 只針對 incoming 不針對 outgoing
1-1. gufw 是 ufw 圖形前端

2. 如果要兼顧 incoming 及 outgoing
請試試 iptables
https://help.ubuntu.com/community/IptablesHowTo
2-1. ufw 是 iptables 的前端
谢谢你的建议,iptables的设置过于复杂,我需要多一些的时间去了解,如果有哪位高手知道如何设置只允许某个程序联网以及只拒绝某个程序联网请告知,我希望能快一些解决已经有人解决过的问题,如果我找到了方法也会在此分享。
meditation
帖子: 217
注册时间: 2009-10-06 21:41
系统: ARCH

Re: 如何用gufw设置只允许某个程序联网以及只拒绝某个程序联网

#5

帖子 meditation » 2015-07-24 17:02

alextx
帖子: 15
注册时间: 2011-07-10 1:25

Re: 如何用gufw设置只允许某个程序联网以及只拒绝某个程序联网

#6

帖子 alextx » 2015-07-24 18:30

meditation 写了:http://askubuntu.com/questions/45072/ho ... ch-program
这个应该是你想要的

谢谢你的回复,里面找到的最快方法应该是使用非仓库软件Leopard Flower,但我目前还没有能力与时间对非仓库软件源代码的安全性进行审查,不太敢用,我在查看其它方法中。
头像
link_01
帖子: 1024
注册时间: 2008-11-05 13:24

Re: 如何用gufw设置只允许某个程序联网以及只拒绝某个程序联网

#7

帖子 link_01 » 2015-07-25 11:01

可以考虑使用iptables 的user过滤,就像android上的iptables根据app的用户名实现一样。
笔记
-------------------------------------
http://blog.163.com/wqt_1101
回复