1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
##########################
# Adresses et interfaces #
##########################
#
#
# local area network
lan_if = "xl0"
lan_net = "x.x.x.x/24"
#
#
# public network 1 : Free
ext_if1 = "vr0"
ext_gw1 = "y.y.y.y"
#
#
# public network 2 : Wanadoo
ext_if2 = "dc0"
ext_gw2 = "z.z.z.z"
#
#
# Internet port list
web_ports = "{ pop3, imap, imaps, pop3s, www, ssh, ftp, sftp }"
#
#
# VPN port list (OpenVPN : udp port 5000) (Isakmpd : udp port 500)
vpn = "{ 5000, 500 }"
#
#
#################
# Regles de NAT #
#################
#
#
# nat outgoing connections on each internet interface
nat on $ext_if1 from $lan_net to any -> $ext_if1
nat on $ext_if2 from $lan_net to any -> $ext_if2
#
#
##################
# Regles d'acces #
##################
#
#
# default deny
block in from any to any
block out from any to any
#
#
# pass all outgoing packets on internal interface
pass out on $lan_if from any to $lan_net
#
#
# pass in quick on $lan_if any packets destined for the gateway itself
pass in quick on $lan_if from $lan_net to $lan_if
#
#
# general pass out rules for external interfaces
pass out on $ext_if1 proto tcp from any to any flags S/SA modulate state
pass out on $ext_if1 proto { udp, icmp } from any to any keep state
pass out on $ext_if2 proto tcp from any to any flags S/SA modulate state
pass out on $ext_if2 proto { udp, icmp } from any to any keep state |
Partager