Hi Guys, i just wanto to block a list of ips from facebook on ipfw.
To capture de list o ips i just use this command:
It will return something like this:
On the ruleset of my ipfw i make the following rule:
But when i restart ipfw it show me the following error:
I think that is because it can read the ip set to the formart ip-1,ip-2,ip-3....
How do i make ipfw read line by line of this ip list or how do i manage the output of the command to show me the ips separated by "," ?
Thank You guys.
To capture de list o ips i just use this command:
Code:
dig facebook.com | awk '$1~/facebook.com/ {print $4,$5}' | awk '$1~/A/ {print $2}'
It will return something like this:
Code:
66.220.149.88
66.220.152.16
69.171.234.21
69.171.237.16
69.171.247.21
69.171.239.12
On the ruleset of my ipfw i make the following rule:
Code:
${fwcmd} add set 12 deny log all from any to ${facebook} dst-port 443 setup keep-state
But when i restart ipfw it show me the following error:
Code:
ipfw: port list: invalid separator <.> in <66.220.149.88>
ipfw: unrecognised option [-1] 66.220.149.88
ipfw: port list: invalid separator <.> in <66.220.149.88>
ipfw: unrecognised option [-1] 66.220.149.88
I think that is because it can read the ip set to the formart ip-1,ip-2,ip-3....
How do i make ipfw read line by line of this ip list or how do i manage the output of the command to show me the ips separated by "," ?
Thank You guys.