分页: 1 / 1

shorewall的几个问题

发表于 : 2006-08-10 8:36
yesilike
一。
lihui@buyer:~$ sudo gunzip -c /usr/share/doc/shorewall/default-config/interfaces.gz > /etc/shorewall/interfaces
bash: /etc/shorewall/interfaces: Permission denied
是哪里错了?

发表于 : 2006-08-10 8:53
yesilike
已解决!
你可以重新按照教程作一次,
把下列代码:
sudo gunzip -c /usr/share/doc/shorewall/default-config/interfaces.gz > /etc/shorewall/interfaces
sudo gunzip -c /usr/share/doc/shorewall/default-config/rules.gz > /etc/shorewall/rules
sudo gunzip -c /usr/share/doc/shorewall/default-config/hosts.gz > /etc/shorewall/hosts
sudo gunzip -c /usr/share/doc/shorewall/default-config/masq.gz > /etc/shorewall/masq
改为:
sudo cp /usr/share/doc/shorewall/default-config/interfaces /etc/shorewall/interfaces
sudo cp /usr/share/doc/shorewall/default-config/rules /etc/shorewall/rules
sudo cp /usr/share/doc/shorewall/default-config/hosts /etc/shorewall/hosts
sudo cp /usr/share/doc/shorewall/default-config/masq /etc/shorewall/masq
即可~

发表于 : 2006-08-10 9:20
yesilike
二)
# 将WEB访问重新定向到 3128 ,通过squid完成访问 ,访问服务器地址 192.168.0.1 除外。
#
#REDIRECT loc 3128 tcp www - !192.168.0.1
这样设置是要将访问web的80端口转向3128吗?如果是,有什麽作用?
如果我还是采取80作为web的默认端口,是不是把上面的配置去掉就可以了?

发表于 : 2006-08-10 9:30
yesilike
$ sudo shorewall start
Loading /usr/share/shorewall/functions...
Processing /etc/shorewall/shorewall.conf...
Loading Modules...
Starting Shorewall...
Initializing...
Shorewall has detected the following iptables/netfilter capabilities:
NAT: Available
Packet Mangling: Available
Multi-port Match: Available
Extended Multi-port Match: Available
Connection Tracking Match: Available
Packet Type Match: Available
Policy Match: Not available
Physdev Match: Available
IP range Match: Available
Recent Match: Available
Owner Match: Available
Ipset Match: Not available
CONNMARK Target: Available
Connmark Match: Available
Raw Table: Available
CLASSIFY Target: Available
Determining Zones...
ERROR: Invalid Zone Type: Net
已终止
是哪里错了?怎样解决?
我是直接连接有线电视的modem上网的。动态的公网ip.
按照Firehared的教程配置的。http://wiki.ubuntu.org.cn/ShoreWall%E5% ... E%E7%BD%AE
配置防火墙规则

sudo gedit /etc/shorewall/rules


* 在倒数第二行,也就是在 “#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE” 这一行之前添加:

#
# 允许 DNS 从 防火墙 连接到 Internet
#
AllowDNS fw net
#
# 允许本地网络可以使用 SSH 来管理服务器
#
AllowSSH loc fw
#
# 允许 Ping 到防火墙和允许防火墙 Ping 其它网络
#
AllowPing loc fw
AllowPing net fw
AllowPing fw loc
AllowPing fw net
#
# 允许 Internet 访问防火墙上的 WEB 服务
#
AllowWeb net fw
#
# 允许 Internet 访问防火墙上的 FTP 服务
#
AllowFTP net fw
#
# 允许 Internet 访问防火墙上的 邮件 服务
#
AllowSMTP net fw
AllowIMAP net fw
#
# 允许本地网络可以访问 Internet
#
AllowWeb loc net
#
# 允许本地网络可以收发邮件
#
AllowSMTP loc net
AllowIMAP loc net
AllowPOP3 loc net
#
# 允许本地网络使用 FTP 到 Internet
#
AllowFTP loc net
#
# 允许本地网络从 Internet 查询 DNS
#
AllowDNS loc net
#
# 允许本地网络使用 NSM
#
ACCEPT loc net tcp 1863
ACCEPT loc net tcp 443
ACCEPT loc net:gateway.messenger.hotmail.com all
#
# 将WEB访问重新定向到 3128 ,通过squid完成访问 ,访问服务器地址 192.168.0.1 除外。
#
#REDIRECT loc 3128 tcp www - !192.168.0.1
去掉了

代码: 全选

 # 将WEB访问重新定向到 3128 ,通过squid完成访问 ,访问服务器地址 192.168.0.1 除外。
      #
      #REDIRECT        loc     3128    tcp     www     -        !192.168.0.1

发表于 : 2006-08-11 0:16
yesilike
有没有哪位高手帮帮我?