How to block spotify on pfsense?

  • Hi guys,

    Is there any way how to block Spotify application on pfsense? TIA…


  • hi Pszafer,

    Where am I going to blocked it? firewall rules?

    Thanks man.. :)

  • Firewall, Alias, add new alias, call it Spotify, add the (Hosts) IP ranges assigned to spotify then create a fw rule to block traffic destined to the alias should do it.

    Then you just need to keep an eye on the spotify ip ranges for changes or additions.

  • Moderator

    If you want to capture all of those IPs on that page without doing it manually, you could run the following script:

    You can change the link or Folder/File Locations or pipe it to a file.

    fetch -v -o /tmp/ips.raw ""
    grep -aoEw -e "(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0
    -9]?/[0-9]{2})" -e "(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0
    -9][0-9]?)" /tmp/ips.raw | sort -t . -k 1,1n -k 2,2n -k 3,3n -k 4,4n | uniq

Log in to reply