shorewall 的设置?
-
- 帖子: 49
- 注册时间: 2005-06-21 18:59
shorewall 的设置?
1 防火墙如何限制本地用户使用Bt软件?
2 防火墙如何限制本地用户观看在线电影?
3 防火墙能控制每个用户的流量吗?
谢谢!
另外:http://www.ubuntu.org.cn/support/docume ... ewall的教程有错:
对于单用户来讲
1 /etc/shorewall/interfaces 应该这样写(不需要loc,而且用“-”代替detect): net ppp0 -
2 /etc/shorewall/rules 中的写法本机根本不能上网
应该是这样:
# 允许上网
AllowWeb fw net
# 允许使用域名解析
AllowDNS fw net
#允许发送Emil
AllowSMTP fw net
# 允许收Emil
Allowpop3 fw net
至于允许从internet访问防火墙上的服务可以参考原文档
3 /etc/shorewall/shorewall.config ip转发没必要写了(本来就一个地址)
4 /etc/shorewall/masq ip伪装也没必要了
2 防火墙如何限制本地用户观看在线电影?
3 防火墙能控制每个用户的流量吗?
谢谢!
另外:http://www.ubuntu.org.cn/support/docume ... ewall的教程有错:
对于单用户来讲
1 /etc/shorewall/interfaces 应该这样写(不需要loc,而且用“-”代替detect): net ppp0 -
2 /etc/shorewall/rules 中的写法本机根本不能上网
应该是这样:
# 允许上网
AllowWeb fw net
# 允许使用域名解析
AllowDNS fw net
#允许发送Emil
AllowSMTP fw net
# 允许收Emil
Allowpop3 fw net
至于允许从internet访问防火墙上的服务可以参考原文档
3 /etc/shorewall/shorewall.config ip转发没必要写了(本来就一个地址)
4 /etc/shorewall/masq ip伪装也没必要了
- firehare
- 帖子: 2625
- 注册时间: 2005-04-10 16:54
- 来自: 温州大学
- 联系:
- oneleaf
- 论坛管理员
- 帖子: 10441
- 注册时间: 2005-03-27 0:06
- 系统: Ubuntu 12.04
- oneleaf
- 论坛管理员
- 帖子: 10441
- 注册时间: 2005-03-27 0:06
- 系统: Ubuntu 12.04
-
- 帖子: 49
- 注册时间: 2005-06-21 18:59
本来我也是像你这样做的,按装防火墙也起了作用oneleaf 写了:我本意是架设一个代理服务器,因此有一个本地网卡和一个ppp0的adsl,
本地网卡和adsl都是接到交换机,其余的电脑通过交换机和服务器上的eth0交互
至于代理上网的规则,我是没有写,嘿嘿。
我是使用80端口转发到3128,使用squid代理出去。
本来准备写的,后来又忘记了。
但是标准的做法是 :
服务器安装eth0、eth1两块网卡,eth0接adsl moden上internet,eht1接到局域网的交换机上,不知道这两种接法有什么区别?特别是安全性有区别吗?
我觉得只用一个网卡通过交换机来连接,是不是服务器和局域网的机器都暴露在外?
- oneleaf
- 论坛管理员
- 帖子: 10441
- 注册时间: 2005-03-27 0:06
- 系统: Ubuntu 12.04
-
- 帖子: 49
- 注册时间: 2005-06-21 18:59
- firehare
- 帖子: 2625
- 注册时间: 2005-04-10 16:54
- 来自: 温州大学
- 联系:
- oneleaf
- 论坛管理员
- 帖子: 10441
- 注册时间: 2005-03-27 0:06
- 系统: Ubuntu 12.04
- firehare
- 帖子: 2625
- 注册时间: 2005-04-10 16:54
- 来自: 温州大学
- 联系:
-
- 帖子: 49
- 注册时间: 2005-06-21 18:59
今天终于弄好了双网卡做路由器配置防火墙的的问题
1 eth0 接adsl,eht1接 本地网始终无法弄好,服务器能上网,也能ping通 eth0 和eht1,但就是无法ping通eth1上的客户机
2 将eth1接adsl,eth0接本地网所有问题解决,唯一没有解决的就是启动时候, 出现以下报警(网络对时失败)
Temporary failure in name resolution
3 /etc/rules 里的规则只能限制外网对服务器及内网对服务器的访问,并不能限制内网(局域网)对外网(internet网)的访问,这点还望各位台兄指点
4 将局域网的机子的网关设置成10.0.1.1(eth1的地址,接adsl网卡)和10.0.04(eth0的地址,接局域网的网卡)都可以上网,这点也是困惑中。
5 我的interfaces写法是: net ppp0
loc eth0
masq的写法是: ppp0 eth0
标准的写法应该是(但服务器和客户机都不能上网了):
interfaces: net eth1
loc eth0
masq: eth1 eth0
希望oneleaf和firehare兄能指点指点。
1 eth0 接adsl,eht1接 本地网始终无法弄好,服务器能上网,也能ping通 eth0 和eht1,但就是无法ping通eth1上的客户机
2 将eth1接adsl,eth0接本地网所有问题解决,唯一没有解决的就是启动时候, 出现以下报警(网络对时失败)
Temporary failure in name resolution
3 /etc/rules 里的规则只能限制外网对服务器及内网对服务器的访问,并不能限制内网(局域网)对外网(internet网)的访问,这点还望各位台兄指点
4 将局域网的机子的网关设置成10.0.1.1(eth1的地址,接adsl网卡)和10.0.04(eth0的地址,接局域网的网卡)都可以上网,这点也是困惑中。
5 我的interfaces写法是: net ppp0
loc eth0
masq的写法是: ppp0 eth0
标准的写法应该是(但服务器和客户机都不能上网了):
interfaces: net eth1
loc eth0
masq: eth1 eth0
希望oneleaf和firehare兄能指点指点。
-
- 帖子: 49
- 注册时间: 2005-06-21 18:59
我估计还是问题还是出在eth1上
/etc/network/interfaces 这个配置文件的到底如何写?man interfaces 发现和
ubuntu 默认的写法有区别?e文好的解释一下吧!
在家里的机器上有了新的发现:以下是ubuntu自动生成的 interfaces(/etc/network的文件)
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
mapping hotplug
script grep
map eth0
iface ppp0 inet ppp
provider ppp0
iface eth0 inet static
address 10.0.0.3
netmask 255.0.0.0
auto eth0
auto ppp0
其中发现了ppp0的界面说明,但在单位的服务期上没有,难道问题出在这里?(家里的ubuntu用的是纯网络安装,单位的服务器用的是光盘安装)
明天就试试(哎,两天搞的同事没上网,估计他们背后烦着呢)
/etc/network/interfaces 这个配置文件的到底如何写?man interfaces 发现和
ubuntu 默认的写法有区别?e文好的解释一下吧!
在家里的机器上有了新的发现:以下是ubuntu自动生成的 interfaces(/etc/network的文件)
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
mapping hotplug
script grep
map eth0
iface ppp0 inet ppp
provider ppp0
iface eth0 inet static
address 10.0.0.3
netmask 255.0.0.0
auto eth0
auto ppp0
其中发现了ppp0的界面说明,但在单位的服务期上没有,难道问题出在这里?(家里的ubuntu用的是纯网络安装,单位的服务器用的是光盘安装)
明天就试试(哎,两天搞的同事没上网,估计他们背后烦着呢)
- oneleaf
- 论坛管理员
- 帖子: 10441
- 注册时间: 2005-03-27 0:06
- 系统: Ubuntu 12.04
-
- 帖子: 49
- 注册时间: 2005-06-21 18:59