是哪里错了?lihui@buyer:~$ sudo gunzip -c /usr/share/doc/shorewall/default-config/interfaces.gz > /etc/shorewall/interfaces
bash: /etc/shorewall/interfaces: Permission denied
shorewall的几个问题
-
- 帖子: 203
- 注册时间: 2006-01-25 15:18
shorewall的几个问题
一。
上次由 yesilike 在 2006-08-10 9:15,总共编辑 1 次。
-
- 帖子: 203
- 注册时间: 2006-01-25 15:18
已解决!
你可以重新按照教程作一次,
把下列代码:
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
即可~
-
- 帖子: 203
- 注册时间: 2006-01-25 15:18
-
- 帖子: 203
- 注册时间: 2006-01-25 15:18
是哪里错了?怎样解决?$ 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
-
- 帖子: 203
- 注册时间: 2006-01-25 15:18