Quoting Markus Rosjat <ros...@ghweb.de>:

Hi there,

I followed the example on http://bgp-spamd.net/client/bgpd.html an tried to setup bgpd. the daemon started without problem but when I try to fetch IPs it doesnt seem to work for me.

$ doas bgpctl show rib community 65066:666
flags: * = Valid, > = Selected, I = via IBGP, A = Announced, S = Stale
origin: i = IGP, e = EGP, ? = Incomplete

flags destination          gateway          lpref   med aspath origin
$

I would expect a list of IPs here or did I missed a point somewere on the way? I simply enabled bgpd without some special flags.

$ doas rcctl enable bgpd
$ doas rcctl get bgpd
bgpd_class=bgpd
bgpd_flags=
bgpd_rtable=0
bgpd_timeout=30
bgpd_user=root
$ doas rcctl start bgpd
bgpd(ok)

here is the bgpd.conf

#macros
spam_rs1="64.142.121.62" # rs.bgp-spamd.net
spam_rs2="217.31.80.170" # eu.bgp-spamd.net
spamASN="65066"

AS 65517

fib-update no               # mandatory, to not update
                            # the local routing table

group "spam-bgp" {
    remote-as $spamASN
    multihop 64
    announce none           # Do not send any route updates
    neighbor $spam_rs1
    neighbor $spam_rs2
}

# 'match' is required, to remove entries when routes are withdrawn
match from group "spam-bgp" community $spamASN:42 set pftable "bgp_spamd_bypass"
match from group "spam-bgp" community $spamASN:666 set pftable "bgp_spamd"

In my pf.conf I just have the tables defined without any rules for the tables.

I can also ping the bgp-spamd servers.

So any advice would be helpful here :)

Regards

--
Markus Rosjat    fon: +49 351 8107223    mail: ros...@ghweb.de

G+H Webservice GbR Gorzolla, Herrmann
Königsbrücker Str. 70, 01099 Dresden

http://www.ghweb.de
fon: +49 351 8107220   fax: +49 351 8107227

Bitte prüfen Sie, ob diese Mail wirklich ausgedruckt werden muss! Before you print it, think about your responsibility and commitment to the ENVIRONMENT

Hi,

I have something like

bgp-spamd:\
         :black:\
         :msg="Your address %A has sent mail to a spamtrap\n\
          within the last 24 hours":\
         :method=file:\
         :file=/var/mail/spamd.black:

in /etc/mail/spamd.conf

and a cron job /bin/sh /etc/mail/bgp-spamd.black.sh which has

#!/bin/sh
AS=65066

bgpctl show rib community ${AS}:666 |
        sed -e '1,4d' -e 's/\/.*$//' -e 's/[ \*\>]*//' > /var/mail/spamd.black

/usr/libexec/spamd-setup

# EOF

Just double checked and can see it is being updated.

$ ls -l /var/mail/spamd.black
-rw-r--r--  1 root  wheel  233006 May  8 05:20 /var/mail/spamd.black

Hope this helps,

Vijay

--
Vijay Sankar, M.Eng., P.Eng.
ForeTell Technologies Limited
vsan...@foretell.ca

Reply via email to