White listing a specific remote IP address

Patrick Ben Koetter p at sys4.de
Sat Aug 19 22:34:23 CEST 2017


* Guido Kuehler <guido.kuehler at it-power.biz>:
> Hello!
> 
> Exist any Example to store the IPs for LOCALHOST, PRIVATENETS and WHITELIST in separate external Files?

Play along this example:

# cat /etc/testmap.cidr
192.0.2.1           OK

In amavisd.conf:

my @csanetworks = @{ read_cidr('/etc/testmap.cidr') };                                                                                     

@client_ipaddr_policy = (
    # \@csanetworks => 'TEST',
    [qw( 0.0.0.0/8 127.0.0.1/32 [::] [::1] )] => 'LOCALHOST',
    [qw( !172.16.1.0/24 172.16.0.0/12 192.168.0.0/16 )] => 'PRIVATENETS',
    [qw( 192.0.2.0/25 192.0.2.129 192.0.2.130 )] => 'PARTNER',
    [qw( 212.7.160.0/19 )] => 'SUBMISSION',
    \@mynetworks => 'MYNETS'
);


HTH,

p at rick


-- 
[*] sys4 AG
 
https://sys4.de, +49 (89) 30 90 46 64
Schleißheimer Straße 26/MG,80333 München
 
Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Marc Schiffbauer, Wolfgang Stief
Aufsichtsratsvorsitzender: Florian Kirstein
 


More information about the amavis-users mailing list