OpenBSD Router mit spamd für einen SBS 2008 auf einer ALIX

# vi /etc/sysctl.conf

Raute vor

net.inet.ip.forwarding=1

entfernen

# vi /etc/hostname.pppoe0

inet 0.0.0.0 255.255.255.255 0.0.0.1 pppoedev vr2 authproto pap authname „BENUTZER“ authkey „KENNWORT“ up
!/sbin/route add default 0.0.0.1

# vi /etc/hostname.vr0

inet YYY.YYY.YYY.1 255.255.255.0

# vi /etc/hostname.vr2

up

# vi /etc/rc.conf

spamd_flags=“-G25:4:864″

# crontab -e

Raute vor

0 * * * * /usr/libexec/spamd-setup

entfernen

# vi /etc/pf.conf

int_if=“vr0″
ext_if=“pppoe0″

int_net=“XXX.XXX.XXX.0/24″

sbs=“YYY.YYY.YYY.YYY/32″

set skip on lo

match on $ext_if scrub (max-mss 1440)

block in
pass out

pass out quick on $ext_if from any to any nat-to ($ext_if)

# spamd rules
table persist
table persist file „/etc/mail/nospamd“
pass in on egress proto tcp from any to any port smtp rdr-to 127.0.0.1 port spamd
pass in on egress proto tcp from to any port smtp rdr-to $sbs
pass in on egress proto tcp from to any port smtp rdr-to $sbs

# sbs rules
pass in on $ext_if proto tcp from any to any port https rdr-to $sbs port https
pass in on $ext_if proto tcp from any to any port 987 rdr-to $sbs port 987

pass quick on {lo $int_if} no state

pass in quick on $ext_if inet proto icmp all icmp-type 8 code 0
pass in on $ext_if proto tcp to ($ext_if) port ssh

# touch /etc/mail/nospamd
# rm /etc/mygate
# reboot