2009/7/24 Antoine MILLET <[email protected]>
> Voici un troll simple du vendredi après-midi : Pourquoi IPTABLES c'est
> moins bien que PF ? :)
>
> Par exemple :
>
> - pf : set skip on lo
> - iptables : /sbin/iptables -A INPUT -i lo -j ACCEPT ; /sbin/iptables
> -A OUTPUT -o lo -j ACCEPT
>
> Ce n'est certe qu'un exemple, mais à quand un firewall avec fichier de
> configuration sous Linux ?
>
> (Oui, je sais que c'est pas génial comme troll, mais bon...)
>
> --
> Antoine MILLET
> www.rentabiliweb.org
> ---------------------------
> Liste de diffusion du FRnOG
> http://www.frnog.org/
>
>
Personellement j'utilise firehol sous linux, ca te donne iptables avec un
fichier de configuration super simple ...
Les regles generees ne le sont pas elles :)
fw:~# firehol try
FireHOL: Saving your old firewall to a temporary file: OK
FireHOL: Processing file /etc/firehol/firehol.conf: OK
FireHOL: Activating new firewall (666 rules): OK
Keep the firewall? (type 'commit' to accept - 30 seconds timeout) : commit
Successfull activation of FireHOL firewall.
fw:~#
home_ips="172.20.0.0/24 239.255.255.250 192.168.10.0/24"
work_ip="xx.xx.yy.yy."
gw_ip="xx.xx.xx.xx yy.yy.yy.yy"
internet_trusted="xx.xx.xx.xx yy.yy.yy.yy"
dnat to 172.20.0.167:5060 inface eth1 proto "tcp udp" dport 5060
dnat to 172.20.0.32:80 inface eth1 src "${internet_trusted}" proto tcp dport
8083
[..]
# Accept all client traffic on any interface
interface eth0 home
client all accept
[..]
interface tun0 vpn
policy accept
client all accept
server all accept
interface ppp0 sshvpn
policy accept
client all accept
server all accept
interface eth1 world
server ident reject with tcp-reset
client all accept
server ssh accept src ${work_ip}
group with src "${internet_trusted}"
server ssh accept
server smtp accept
server ping accept
group end
router home2vpn inface eth0 outface tun0
route all accept
router vpn2home inface tun0 outface eth0
route all accept
router home2world inface eth0 outface eth1
masquerade
route all accept
router world2home inface eth1 outface eth0
client all accept
server http accept dst 172.20.0.32
[..]
router home2sshvpn inface eth0 outface ppp0
masquerade
route all accept
--
Gael Martinez