[Solved]Is Aliases can block?

  • Hello guys i have question with the Aliases.

    I go at IP. then i click add then i choose HOST i input like www.twitter.com then save name like "block"

    Then i go to Firewall > Rules > Lan then i add block then i set in Single host or alias, then i choose "block".

    Then i clear all history in chrome then i reload the Filter Reload in the PFSense. then i search twitter and still able to browse the twitter.

  • Yes, aliases can be used to block.
    Works best using IP's, but it can work using URL. The URL will get resolved for you.

    @Vincent_28 said in Is Aliases can block?:

    I go at IP. then i click add then i choose HOST i input like www.twitter.com then save name like "block"

    Wait ...
    You think www.twitter.com points to a (one :) unique IP ?
    If that was so, it would probably work : the URL ( www.twitter.com ) will get converted to an IP - the IP from twitter - and you'll be happy.
    Btw : the firewall uses IP's, not URL's.

    Now for bad news :
    twitter - youtube - facebook, outlook, yahoo - netflix - amazon - etc etc etc (the big ones) use not one IP.
    They use thousands of IP's .... and they also use many IPv6 ....
    And to make things wore : they maintain there servers, and when they do so, they take it out of the "circulation" (they remove the IP as a possible A address) - and put in others in place.
    They do the same thing for load balancing.

    Look at this :

    [2.4.4-RELEASE][admin@pfsense.brit-hotel-fumel.net]/root: dig twitter.com A +short

    I wait a minute or so and repeat the command :

    [2.4.4-RELEASE][admin@pfsense.brit-hotel-fumel.net]/root: dig twitter.com A +short

    You saw it ? One of the IP's changed !

    So, no, putting in an URL in alias and think that will help you to block a domain name, that's ok and often works. But not for the "big ones".

    The subject is known, you can find many forum messages about this subject.
    You'll be needing pfBlockerNG or something Squid family (have no experience with the latter).

  • You may be better blocking via ASN number with pfBlockerNG-devel.

    AS details for AS13414 :-

    aut-num: AS13414
    as-name: TWITTER
    descr: Twitter
    import: from AS-ANY accept ANY AND NOT {}
    export: to AS-ANY announce AS-TWITTER AND NOT {}
    admin-c: NETWO3685-ARIN
    tech-c: NETWO3685-ARIN
    notify: noc@twitter.com
    mnt-by: MAINT-AS13414
    changed: rcarroll@twitter.com 20190702 #08:43:36Z
    source: RADB

    IPv4 subnets for AS13414 :-

    IPv6 subnets for AS13414 :-


    Monday, 18 November 2019 at 11:07:37 Greenwich Mean Time

  • LAYER 8 Global Moderator

    And then lets not forget that these services that are served up via CDN, the same CDNs will be hosting other services... So blocking xyz.com could also block abc.com

    If you want to play internet police - then you should use a proxy.. Proxy will prevent going to xyz.com but allow going to abc.com - even if hosted off the same IP.

    Or just block at a dns level.. So can not lookup xyz.com, but you can lookup abc.com to go there.

  • Maybe Snort & openappid-social_networking.rules, there is a rule for Twitter.

  • LAYER 8 Global Moderator

    Be easier to just not anything.twitter.com to be resolved ;) And don't let any other dns out..

    Not sure why anyone want to block twitter though, I could see high bandwidth sites like youtube, etc. Where users streaming video could hog up bandwidth.. But some tweets? Not real bandwidth killers ;)

  • Thanks for the info.

Log in to reply