Em Thu, 15 Mar 2012 08:59:50 -0300, Marcelo Gondim escreveu
> Em 15/03/2012 08:28, Nilton Jose Rizzo escreveu:
> > Em Wed, 14 Mar 2012 23:44:06 -0300, Marcelo Gondim escreveu
> >> Em 14/03/2012 22:34, Marcelo/Porks escreveu:
> >>> On Mar 13, 2012 11:18 PM, "Nilton Jose Rizzo"<ri...@i805.com.br>   wrote:
> >>>>
> >>>>
> >>>>     Boa noite,
> >>>>
> >>>>
> >>>>       Ja a muito tempo  sempre ignorei o sript de firewall do free
> >>>>    e fazia o meu próprio.
> >>>>
> >>>>        Como montei uma máquina nova (FreeBSD 9.0) fui utilizar
> >>>>    a opção do rc.conf para colocar o meu script para rodar,e para minha
> >>>>    surpresa o negocio não inicializa corretamente, dá erros em um echo  
> >>>> ou
> >> Oi Nilton,
> >>
> >> Eu uso meu próprio script ipfw e faço assim pra ele rodar pelo /etc/rc.conf
> >>
> >> firewall_enable="YES"
> >> firewall_script="/etc/beastiefrw/beastiefrw"
> >      Eu usava assim mas como é uma workstation preferi usar o firewall
> >    pré-configurado e mais umas coisinha e ai usei a variável _type
> >    mas os comandos dão erros, se usar dessa forma como vc sitou funciona
> >    perfeito.
> 
> Ah tá mas tipo quando você aponta o firewall_type para o seu script, 
> o rc.firewall só chama ele, você vai continuar carregando apenas as 
> suas regras. O que pode estar ocorrendo é que o seu script esteja 
> sem permissão de execução: chmod 700 /etc/rc.personalfw Já viu se é 
> isso? Porque no seu teste você faz: sh /etc/rc.personalfw  e nesse 
> caso não precisa ter permissão de execução porque vc tá chamando 
> pelo interpretador. Bem eu precisava te perguntar isso rsrsrsrs


   Não é isso veja:


As permissões originais
home# ls -lisa /etc/rc.firewall 
16568 20 -rw-r--r--  1 root  wheel  18592 Dec  4 07:12 /etc/rc.firewall
home# ls -lisa /etc/rc.d/ipfw
16677 4 -r-xr-xr-x  1 root  wheel  2188 Dec  4 07:12 /etc/rc.d/ipfw
home# 

% ls -lisa /etc/rc.personalfw 
18209 4 -rw-r--r--  1 root  wheel  190 Mar 13 23:13 /etc/rc.personalfw
% su
Password:
home# chmod 744 /etc/rc.personalfw 
home# /etc/rc.d/ipfw start
Flushed all rules.
00100 allow ip from any to any via lo0
00200 deny ip from any to 127.0.0.0/8
00300 deny ip from 127.0.0.0/8 to any
00400 deny ip from any to ::1
00500 deny ip from ::1 to any
00600 allow ipv6-icmp from :: to ff02::/16
00700 allow ipv6-icmp from fe80::/10 to fe80::/10
00800 allow ipv6-icmp from fe80::/10 to ff02::/16
00900 allow ipv6-icmp from any to any ip6 icmp6types 1
01000 allow ipv6-icmp from any to any ip6 icmp6types 2,135,136
Line 3: bad command `echo'
Firewall rules loaded.
Firewall logging enabled.
home# ls -lisa /etc/rc.personalfw 
18209 4 -rwxr--r--  1 root  wheel  190 Mar 13 23:13 /etc/rc.personalfw
home# chmod 700 /etc/rc.personalfw
home# /etc/rc.d/ipfw start
Flushed all rules.
00100 allow ip from any to any via lo0
00200 deny ip from any to 127.0.0.0/8
00300 deny ip from 127.0.0.0/8 to any
00400 deny ip from any to ::1
00500 deny ip from ::1 to any
00600 allow ipv6-icmp from :: to ff02::/16
00700 allow ipv6-icmp from fe80::/10 to fe80::/10
00800 allow ipv6-icmp from fe80::/10 to ff02::/16
00900 allow ipv6-icmp from any to any ip6 icmp6types 1
01000 allow ipv6-icmp from any to any ip6 icmp6types 2,135,136
Line 3: bad command `echo'
Firewall rules loaded.
Firewall logging enabled.
home# chmod 755 /etc/rc.personalfw
home# /etc/rc.d/ipfw start
Flushed all rules.
00100 allow ip from any to any via lo0
00200 deny ip from any to 127.0.0.0/8
00300 deny ip from 127.0.0.0/8 to any
00400 deny ip from any to ::1
00500 deny ip from ::1 to any
00600 allow ipv6-icmp from :: to ff02::/16
00700 allow ipv6-icmp from fe80::/10 to fe80::/10
00800 allow ipv6-icmp from fe80::/10 to ff02::/16
00900 allow ipv6-icmp from any to any ip6 icmp6types 1
01000 allow ipv6-icmp from any to any ip6 icmp6types 2,135,136
Line 3: bad command `echo'
Firewall rules loaded.
Firewall logging enabled.
home# 

home# /etc/rc.personalfw 
Firewall version 1.0
====================
65000 allow ip from any to any
10000 deny log ip from any to me via re0 setup
home# /etc/rc.d/ipfw start
Flushed all rules.
00100 allow ip from any to any via lo0
00200 deny ip from any to 127.0.0.0/8
00300 deny ip from 127.0.0.0/8 to any
00400 deny ip from any to ::1
00500 deny ip from ::1 to any
00600 allow ipv6-icmp from :: to ff02::/16
00700 allow ipv6-icmp from fe80::/10 to fe80::/10
00800 allow ipv6-icmp from fe80::/10 to ff02::/16
00900 allow ipv6-icmp from any to any ip6 icmp6types 1
01000 allow ipv6-icmp from any to any ip6 icmp6types 2,135,136
Line 3: bad command `echo'
Firewall rules loaded.
Firewall logging enabled.



-- 
Nilton José Rizzo 
805 Informatica 
Disseminando tecnologias 
021 2413 9786
---
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

http://en.wikipedia.org/wiki/Posting_style

-------------------------
Histórico: http://www.fug.com.br/historico/html/freebsd/
Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd

Responder a