top | item 6640408

Disabling old IP addresses

55 points| gregman | 12 years ago |github.com

14 comments

order
[+] kojoru|12 years ago|reply
Why do people add github's ip-addresses to their hosts file? What are the practical gains?
[+] voidlogic|12 years ago|reply
practical gains? None.

theroetical gains?

* They can try to pick a server near them (I don't think the servers are geo-dist)

* No external DNS lookup (silly, whats a one-time cached 150 ms between friends)

* Immune to DNS outage (lol, if your DNS is working other stuff is prob broke..)

* More resistant to someone pretending to be github (expect that github uses HTTPS..)

So really no point I can think of... but is sure makes you computer brittle to github changing anything!

[+] crb|12 years ago|reply
Contrived example: a Puppet script that configures a VM with DNS servers, which are not otherwise provided in the image or by DHCP. You need to get that script itself somehow.
[+] RobAley|12 years ago|reply
I know a couple of people who work on locked-down networks with firewalls that require permitted sites to be specified by IP address. If you're not confident that DNS will always return the same IP address (e.g. round-robin DNS servers) a common tactic is add a specific IP to the hosts file to make sure it always matches the rule in the firewall.
[+] lambda|12 years ago|reply
Sometimes, DNS will break for me (someone's DNS server will get hit by a DDOS, say), and I'll add the appropriate records to my /etc/hosts to work around it. I may not notice that I've done this until several years later when it stops working because their IP address changed.
[+] IgorPartola|12 years ago|reply
I think the more likely explanation is the behavior I have seen in IE8 and below where DNS entries get cached and as long as the server responds correctly, they cache is not busted. On one particular upgrade we brought the TTL down to 60 seconds and had to wait three days for the traffic to subside.

Also, at least older versions of nginx in reverse proxying mode have the same issue. Had to send the nginx processes a SIGHUP or restart them entirely, don't remember which, to get them to use the new IP's.

[+] ceejayoz|12 years ago|reply
I believe some ISPs have a TTL threshold under which they use their internal default. i.e. a TTL of 60 seconds would be ignored and become 86400, whereas a 3600 second TTL might still be respected.
[+] joaomsa|12 years ago|reply
We check a request's IP address for blocks owned by GitHub as a form of authentication for service hooks to consume commits and implement continuous integration/delivery on a project.

They list these blocks in the service hooks configuration page. Are these address blocks also due for change/deprecation?

[+] wink|12 years ago|reply
Yes, the 204.232.175.* IPs went away, 192.30.252.0/22 are still here.