Block ip address

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read how to get help
Post Reply
User avatar
justy39
Level 1
Level 1
Posts: 48
Joined: Thu Nov 22, 2012 7:32 pm
Location: usa

Block ip address

Post by justy39 » Wed Jun 26, 2013 9:24 am

Still learning the mint firewall in 13.

What I am trying to do is block a cache ip address from youtube. I read that, videos will stop studdering. Even though I have 15mb internet, I can only view 240p.. I did the traffic shaping tests and everything. Nothing was found.

Here is a thing I found about this youtube Ip address.
I've managed to block those caches! What you need to do is use Windows Firewall (or iptables if you're linux) to block 206.111.0.0/16. As far as I can tell, this won't block any other websites hosted on XO, but YMMV. Instructions for blocking with windows firewall here. Once 206.111.0.0/16 is blocked, youtube's player logic will fall back to Google's datacenters and stream at beautiful speeds.
So in gufw, I am trying to figure out how to make that rule. I made one in advance, but not sure if done correct.

What I did is went in advance. Put on deny.... In.... Both... From: 173.194.55.0 port: 24.... To: 206.111.0.0 port: 16

Where I got the numbers. I dunno for sure, but seems to work. I can actually watch 720p without a studder. http://www.newtontips.com/speed-up-youtube-video-streaming-on-windows-with-this-simple-trick/
Odin's Oath Keepers.

User avatar
xenopeek
Level 24
Level 24
Posts: 22768
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Block ip address

Post by xenopeek » Wed Jun 26, 2013 10:54 am

Well, first, 206.111.0.0/16 doesn't mean IP address 206.111.0.0 and port 16. It means the base IP address 206.111.0.0 and an address space 16 bits wide. So IP address 206.111.0.0 through 206.111.255.255 (65536 IP addresses, or 2^16). And from the article the comma between 173.194.55.0/24 and 206.111.0.0/16 doesn't indicate "from - to" relationship, it means "and"--so you want to block both these incoming address ranges. You need to block incoming traffic from both these ranges. Though I did that and I'm not sure what difference I should be looking for; Youtube behaves the same with and without?

So I'd remove those rules you added in in gufw. You can probably figure out the correct rules to add with gufw, though I prefer just to use ufw from the terminal as that way you can just use English instead of having to click around. Here are the two commands to give to block as this article suggests:

Code: Select all

sudo ufw reject in from 173.194.55.0/24
sudo ufw reject in from 206.111.0.0/16
You can check the rules afterwards with:

Code: Select all

sudo ufw status verbose
Which should output similar to:

Code: Select all

Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing)
New profiles: skip

To                         Action      From
--                         ------      ----
Anywhere                   REJECT IN   173.194.55.0/24
Anywhere                   REJECT IN   206.111.0.0/16
Image

User avatar
justy39
Level 1
Level 1
Posts: 48
Joined: Thu Nov 22, 2012 7:32 pm
Location: usa

Re: Block ip address

Post by justy39 » Wed Jun 26, 2013 6:33 pm

Thank you for explaining that. Got it added in ufw.. Going to save the info as a html, in case I run into it again.
Odin's Oath Keepers.

gnjepar
Level 1
Level 1
Posts: 18
Joined: Tue Jun 25, 2013 7:23 am

Re: Block ip address

Post by gnjepar » Wed Jun 26, 2013 6:45 pm

Let me just mention that my ISP has a local YT cache server so keep in mind this could be the case with yours ISP as well.

Post Reply

Return to “Other networking topics”