OPNsense Forum

English Forums => General Discussion => Topic started by: tibere86 on February 02, 2018, 04:34:58 pm

Title: Alias URL Question
Post by: tibere86 on February 02, 2018, 04:34:58 pm
I am trying to add a URL based Alias ASN list to block all Google traffic. Not sure which option to use...URL (IP) or URL (IP Table).
Is there anyway to verify OPNsense resolves all listed subnets from URL?
Title: Re: Alias URL Question
Post by: onefix on February 03, 2018, 04:34:25 am
I don't think OPNSense has an automated ASN lookup rule.  What I have done is create a script to output a number of requests / lists to an /opt file once a day.  The command would look like this:

whois -h whois.radb.net -- '-i origin AS15169' | grep -Eo "([0-9.]+){4}/[0-9]+" > /opt/aliases/google_ips

You should then simply create a rule URL Table (IPs) and point the first entry to /opt/aliases/google_ips