Fresh import of RIPE lines; also added ilines.asn.conf which is a list
of AS numbers assigned to Switzerland and Liechtenstein according to the RIPE NCC's database (ie delegated-ripencc-latest) Added class 250 for the asn I lines, and inserted them in users.conf This also obsoletes the update_ilines.sh shell script, replaced by the ilines_update.cron which will be run manually for a little while and then cronned every month/quarter or so. git-svn-id: svn+ssh://svn.ipng.nl/usr/share/subversion/repositories/ircnet.ipng.ch@34 c5d60b8d-fdcb-4146-b734-af4215e9eb71
This commit is contained in:
@ -6,19 +6,20 @@ MASTERLOG="/home/ircd/cronscripts/logs/${NAME}.log"
|
|||||||
|
|
||||||
PATH=/usr/local/bin:/usr/bin:/bin:/home/ircd/bin
|
PATH=/usr/local/bin:/usr/bin:/bin:/home/ircd/bin
|
||||||
|
|
||||||
INPUT_DELEGATED="/home/ircd/ircd/ripedb/delegated-ripencc-latest"
|
INPUT_DELEGATED="/home/ircd/ircd/etc/ripedb/delegated-ripencc-latest"
|
||||||
|
OUTPUT_ROOT="/home/ircd/ircd/etc"
|
||||||
|
|
||||||
do_country()
|
do_country()
|
||||||
# $1=country $2=class $3=threshold
|
# $1=country $2=class $3=threshold
|
||||||
{
|
{
|
||||||
delegated_ilines.py -i $INPUT -o ilines.$1.$$ -c $1 -y $2
|
delegated_ilines.py -i $INPUT_DELEGATED -o ilines.$1.$$ -c $1 -y $2
|
||||||
[ ! -r ilines.$1.$$ ] && return -1
|
[ ! -r ilines.$1.$$ ] && return -1
|
||||||
[ `wc -l ilines.$1.$$ | awk '{ print $1 }'` -lt $3 ] && {
|
[ `wc -l ilines.$1.$$ | awk '{ print $1 }'` -lt $3 ] && {
|
||||||
warning "$1: File too short, less than $3 lines"
|
warning "$1: File too short, less than $3 lines"
|
||||||
rm -f -- ilines.$1.$$
|
rm -f -- ilines.$1.$$
|
||||||
return -2
|
return -2
|
||||||
}
|
}
|
||||||
mv ilines.$1.$$ ../include/ilines.$1.conf
|
mv ilines.$1.$$ $OUTPUT_ROOT/include/ilines.$1.conf
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -32,7 +33,7 @@ do_asn()
|
|||||||
rm -f -- ilines.asn.$$
|
rm -f -- ilines.asn.$$
|
||||||
return -2
|
return -2
|
||||||
}
|
}
|
||||||
mv ilines.asn.$$ ../include/ilines.asn.conf
|
mv ilines.asn.$$ $OUTPUT_ROOT/include/ilines.asn.conf
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,7 +47,7 @@ do_asset()
|
|||||||
rm -f -- ilines.as-set.$$
|
rm -f -- ilines.as-set.$$
|
||||||
return -2
|
return -2
|
||||||
}
|
}
|
||||||
mv ilines.as-set.$$ ../include/ilines.as-set.conf
|
mv ilines.as-set.$$ $OUTPUT_ROOT/include/ilines.as-set.conf
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,5 +73,6 @@ function bitcron_main()
|
|||||||
do_asset AS-IP-MAN-PEERING-TIX,AS-IP-MAN-PEERING-CIXP,AS-IP-MAN-PEERING-SWISSIX 300 1000
|
do_asset AS-IP-MAN-PEERING-TIX,AS-IP-MAN-PEERING-CIXP,AS-IP-MAN-PEERING-SWISSIX 300 1000
|
||||||
|
|
||||||
# svn commit -m "Automatic I-lines update by ilines_update.cron"
|
# svn commit -m "Automatic I-lines update by ilines_update.cron"
|
||||||
|
# pkill -HUP ircd
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
# File generated on Fri Sep 4 12:41:41 2009 by ircd@ircnet
|
# File generated on Tue Sep 8 11:04:29 2009 by ircd@ircnet
|
||||||
# Commandline: ./asset_ilines.py -o ilines.as-set.conf -y 300
|
# Commandline: /home/ircd/bin/asset_ilines.py -l -o ilines.as-set.13045 -a AS-IP-MAN-PEERING-TIX,AS-IP-MAN-PEERING-CIXP,AS-IP-MAN-PEERING-SWISSIX -y 300
|
||||||
# assets=AS-IP-MAN-PEERING-TIX,AS-IP-MAN-PEERING-CIXP,AS-IP-MAN-PEERING-SWISSIX output=ilines.as-set.conf class=300
|
# assets=AS-IP-MAN-PEERING-TIX,AS-IP-MAN-PEERING-CIXP,AS-IP-MAN-PEERING-SWISSIX asns= output=ilines.as-set.13045 class=300
|
||||||
# Objects found: 1487 route/route6, 71 ASn, 3 as-set
|
# Objects found: 1487 route/route6, 71 ASn, 3 as-set
|
||||||
|
|
||||||
# AS-IP-MAN-PEERING-CIXP: 174, 513, 559, 1836, 6853, 8327, 8674, 9044, 12333, 12350, 12654, 13030, 15600, 16215, 24904, 25091, 25152, 29222, 33845, 34146, 34781, 35054, 39180
|
# AS-IP-MAN-PEERING-CIXP: 174, 513, 559, 1836, 6853, 8327, 8674, 9044, 12333, 12350, 12654, 13030, 15600, 16215, 24904, 25091, 25152, 29222, 33845, 34146, 34781, 35054, 39180
|
||||||
|
# LOCAL:
|
||||||
# AS-IP-MAN-PEERING-SWISSIX: 1836, 6772, 6776, 6893, 8237, 8302, 8758, 9153, 12350, 12429, 13030, 15598, 15600, 15623, 16030, 16111, 16215, 16221, 16242, 16265, 20634, 20893, 20940, 21232, 24951, 29655, 29691, 31424, 31736, 33845, 33958, 34288, 34554, 34960, 35206, 35256, 39040, 41913, 42486
|
# AS-IP-MAN-PEERING-SWISSIX: 1836, 6772, 6776, 6893, 8237, 8302, 8758, 9153, 12350, 12429, 13030, 15598, 15600, 15623, 16030, 16111, 16215, 16221, 16242, 16265, 20634, 20893, 20940, 21232, 24951, 29655, 29691, 31424, 31736, 33845, 33958, 34288, 34554, 34960, 35206, 35256, 39040, 41913, 42486
|
||||||
# AS-IP-MAN-PEERING-TIX: 174, 559, 1257, 1836, 3209, 4589, 6772, 6776, 6805, 8235, 8271, 8833, 8928, 9044, 12399, 12429, 13030, 13250, 15517, 15600, 15623, 16215, 20634, 20940, 21069, 21232, 21494, 24889, 24951, 29222, 31662, 33845, 34781
|
# AS-IP-MAN-PEERING-TIX: 174, 559, 1257, 1836, 3209, 4589, 6772, 6776, 6805, 8235, 8271, 8833, 8928, 9044, 12399, 12429, 13030, 13250, 15517, 15600, 15623, 16215, 20634, 20940, 21069, 21232, 21494, 24889, 24951, 29222, 31662, 33845, 34781
|
||||||
#
|
#
|
||||||
|
2384
include/ilines.asn.conf
Normal file
2384
include/ilines.asn.conf
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,9 +1,8 @@
|
|||||||
# File generated on Thu Sep 3 21:32:27 2009 by ircd@ircnet
|
# File generated on Tue Sep 8 10:55:03 2009 by ircd@ircnet
|
||||||
# Commandline: ./ilines.py -i delegated-ripencc-latest -o ilines.ch.7911 -y 200 -c ch
|
# Commandline: /home/ircd/bin/delegated_ilines.py -i /home/ircd/ircd/etc/ripedb/delegated-ripencc-latest -o ilines.ch.13045 -c ch -y 200
|
||||||
# input=delegated-ripencc-latest output=ilines.ch.7911 country=CH class=200
|
# input=/home/ircd/ircd/etc/ripedb/delegated-ripencc-latest output=ilines.ch.13045 country=CH class=200
|
||||||
# First line: 2|ripencc|1251756421|56709|00000000|20090831|+0200
|
# First line: 2|ripencc|1251756421|56709|00000000|20090831|+0200
|
||||||
# $Id: $
|
#
|
||||||
|
|
||||||
|
|
||||||
I%*@62.2.0.0/16%%%%200%% # 19981211
|
I%*@62.2.0.0/16%%%%200%% # 19981211
|
||||||
I%*@62.12.128.0/17%%%%200%% # 20000410
|
I%*@62.12.128.0/17%%%%200%% # 20000410
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
# File generated on Thu Sep 3 21:32:27 2009 by ircd@ircnet
|
# File generated on Tue Sep 8 10:55:03 2009 by ircd@ircnet
|
||||||
# Commandline: ./ilines.py -i delegated-ripencc-latest -o ilines.li.7911 -y 202 -c li
|
# Commandline: /home/ircd/bin/delegated_ilines.py -i /home/ircd/ircd/etc/ripedb/delegated-ripencc-latest -o ilines.li.13045 -c li -y 202
|
||||||
# input=delegated-ripencc-latest output=ilines.li.7911 country=LI class=202
|
# input=/home/ircd/ircd/etc/ripedb/delegated-ripencc-latest output=ilines.li.13045 country=LI class=202
|
||||||
# First line: 2|ripencc|1251756421|56709|00000000|20090831|+0200
|
# First line: 2|ripencc|1251756421|56709|00000000|20090831|+0200
|
||||||
# $Id: $
|
#
|
||||||
|
|
||||||
|
|
||||||
I%*@80.66.224.0/20%%%%202%% # 20010520
|
I%*@80.66.224.0/20%%%%202%% # 20010520
|
||||||
I%*@80.72.48.0/20%%%%202%% # 20050124
|
I%*@80.72.48.0/20%%%%202%% # 20050124
|
||||||
|
@ -15,9 +15,10 @@ Y%50%90%%50%512000%10.2%10.2
|
|||||||
# Class for local users
|
# Class for local users
|
||||||
Y%100%90%%50%512000%3%3
|
Y%100%90%%50%512000%3%3
|
||||||
|
|
||||||
# Class for all ripe 'delegated' users
|
# Class for all ripe 'delegated' netblocks/ASNs
|
||||||
Y%200%90%%500%512000%2.2%3.2 # CH
|
Y%200%90%%500%512000%2.2%3.2 # CH
|
||||||
Y%202%120%%100%512000%2.2%3.2 # LI
|
Y%202%120%%100%512000%2.2%3.2 # LI
|
||||||
|
Y%250%120%%100%512000%2.2%3.2 # ASNs
|
||||||
|
|
||||||
# Class for all peering 'as-set' users
|
# Class for all peering 'as-set' users
|
||||||
Y%300%90%%500%512000%2.2%3.2
|
Y%300%90%%500%512000%2.2%3.2
|
||||||
@ -26,10 +27,13 @@ Y%300%90%%500%512000%2.2%3.2
|
|||||||
Y%400%90%%100%256000%1.1%1.1
|
Y%400%90%%100%256000%1.1%1.1
|
||||||
|
|
||||||
# I%<TARGET Host Addr>%<Password>%<TARGET Hosts NAME>%<Port>%<Class>%<Flags>%
|
# I%<TARGET Host Addr>%<Password>%<TARGET Hosts NAME>%<Port>%<Class>%<Flags>%
|
||||||
# RIPE DB 'delegation' supplied I lines (IPv4 and IPv6)
|
# RIPE DB 'delegation' supplied I lines per netblock (IPv4 and IPv6)
|
||||||
#include include/ilines.ch.conf
|
#include include/ilines.ch.conf
|
||||||
#include include/ilines.li.conf
|
#include include/ilines.li.conf
|
||||||
|
|
||||||
|
# RIPE DB 'delegation' supplied I lines per AS (IPv4 and IPv6)
|
||||||
|
#include include/ilines.asn.conf
|
||||||
|
|
||||||
# RIPE DB 'as-set' supplied I lines (IPv4 and IPv6)
|
# RIPE DB 'as-set' supplied I lines (IPv4 and IPv6)
|
||||||
#include include/ilines.as-set.conf
|
#include include/ilines.as-set.conf
|
||||||
|
|
||||||
|
@ -169,16 +169,18 @@ def main():
|
|||||||
ofile.write("# File generated on %s by %s@%s\n" %
|
ofile.write("# File generated on %s by %s@%s\n" %
|
||||||
(time.asctime(time.localtime(time.time())),
|
(time.asctime(time.localtime(time.time())),
|
||||||
getpass.getuser(), socket.gethostname()))
|
getpass.getuser(), socket.gethostname()))
|
||||||
ofile.write("# Commandline: %s\n" % ' '.join(sys.argv))
|
# TODO(pim): Make these lines wrap at ~80char because the ircd config
|
||||||
ofile.write("# assets=%s asns=%s output=%s class=%s\n" %
|
# parser cannot take long lines :(
|
||||||
(','.join(_assets), ','.join(_asns), _output, _class))
|
# ofile.write("# Commandline: %s\n" % ' '.join(sys.argv))
|
||||||
|
# ofile.write("# assets=%s asns=%s output=%s class=%s\n" %
|
||||||
|
# (','.join(_assets), ','.join(_asns), _output, _class))
|
||||||
|
|
||||||
ofile.write("# Objects found: %d route/route6, %d ASn, %d as-set\n\n" %
|
ofile.write("# Objects found: %d route/route6, %d ASn, %d as-set\n\n" %
|
||||||
(len(all_route_list), len(_data['asn']), len(_assets)))
|
(len(all_route_list), len(_data['asn']), len(_assets)))
|
||||||
|
|
||||||
for _asset in _data['as-set']:
|
# for _asset in _data['as-set']:
|
||||||
ofile.write("# %s: %s\n" %
|
# ofile.write("# %s: %s\n" %
|
||||||
(_asset, ', '.join(_data['as-set'][_asset])))
|
# (_asset, ', '.join(_data['as-set'][_asset])))
|
||||||
ofile.write("#\n\n")
|
ofile.write("#\n\n")
|
||||||
|
|
||||||
output_linecount = 0
|
output_linecount = 0
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
INPUT="delegated-ripencc-latest"
|
|
||||||
|
|
||||||
do_country()
|
|
||||||
# $1=country $2=class $3=threshold
|
|
||||||
{
|
|
||||||
./delegated_ilines.py -i $INPUT -o ilines.$1.$$ -y $2 -c $1
|
|
||||||
[ ! -r ilines.$1.$$ ] && return -1
|
|
||||||
[ `wc -l ilines.$1.$$ | awk '{ print $1 }'` -lt $3 ] && {
|
|
||||||
echo "$1: File too short, less than $3 lines"
|
|
||||||
return -2
|
|
||||||
}
|
|
||||||
mv ilines.$1.$$ ../include/ilines.$1.conf
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
do_country ch 200 1000
|
|
||||||
do_country li 202 15
|
|
Reference in New Issue
Block a user