nanog mailing list archives
Re: BGP hijack from 23724 -> 4134 China?
From: James Hess <mysidia () gmail com>
Date: Fri, 9 Apr 2010 00:53:14 -0500
On Thu, Apr 8, 2010 at 9:35 PM, Brielle Bruns <bruns () 2mbit com> wrote:
I grabbed that access-list from the routers directly, so thats why it's been generated already. If there's a tool for UNIX/Linux that can generate the wildcard masks from CIDR in bulk for use in creating ACLs, I'd be happy to put it up on the page.
UNIX/Linux users can probably accomplish using simple scripting, since there are perl modules such as NetAddr::IP available. eg #!/usr/bin/perl use Net::CIDR qw/cidradd/; use NetAddr::IP; @list=(); while (<>) { chomp; while ( $_ =~ s/^\s*([a-fA-F0-9:.]+)\/(\d+)\s*/ / ) { @list = cidradd($1 . '/' . $2, @list); } } for (@list) { $ip = new NetAddr::IP($_); print "access-list 199 deny " . $ip->addr() . " " . $ip->wildcard() . "\n" ; } -- -J
Current thread:
- Re: BGP hijack from 23724 -> 4134 China?, (continued)
- Re: BGP hijack from 23724 -> 4134 China? Brielle Bruns (Apr 08)
- Re: BGP hijack from 23724 -> 4134 China? Jay Hennigan (Apr 08)
- Re: BGP hijack from 23724 -> 4134 China? Beavis (Apr 08)
- Re: BGP hijack from 23724 -> 4134 China? Brielle Bruns (Apr 08)
- Re: BGP hijack from 23724 -> 4134 China? Will Clayton (Apr 08)
- RE: BGP hijack from 23724 -> 4134 China? Aaron Wendel (Apr 08)
- Re: BGP hijack from 23724 -> 4134 China? Brielle Bruns (Apr 08)
- Re: BGP hijack from 23724 -> 4134 China? Danny McPherson (Apr 08)
- Re: BGP hijack from 23724 -> 4134 China? Brielle Bruns (Apr 08)
- Re: BGP hijack from 23724 -> 4134 China? Danny McPherson (Apr 08)
- Re: BGP hijack from 23724 -> 4134 China? James Hess (Apr 08)
- Re: BGP hijack from 23724 -> 4134 China? goemon (Apr 08)
- RE: BGP hijack from 23724 -> 4134 China? George Bonser (Apr 09)
- RE: BGP hijack from 23724 -> 4134 China? goemon (Apr 09)
- Re: BGP hijack from 23724 -> 4134 China? Brielle Bruns (Apr 08)
- Re: BGP hijack from 23724 -> 4134 China? Larry Smith (Apr 08)
- Re: BGP hijack from 23724 -> 4134 China? Michael Holstein (Apr 09)
- Re: BGP hijack from 23724 -> 4134 China? Benjamin BILLON (Apr 09)
- Re: BGP hijack from 23724 -> 4134 China? Jeroen van Aart (Apr 09)
- Re: BGP hijack from 23724 -> 4134 China? Benjamin Billon (Apr 09)
- Re: BGP hijack from 23724 -> 4134 China? Jeroen van Aart (Apr 09)
- Re: BGP hijack from 23724 -> 4134 China? Benjamin Billon (Apr 09)