I do a lot of web development on untrusted networks (coffeeshops, the neighbors' open wifi, DEF CON), and I get twitchy when random, assuredly buggy software (my Rails app under development, say) binds a port on 0.0.0.0 and starts taking requests from all comers. I know that I can specify the address of binding with the -b option to the server, but I'd like to change the default globally so it always runs that way unless I tell it otherwise. Of course I can also run some kind of firewall which will block the connection, but better not to listen in the first place. Is there a '.railsrc' file or similar -- at least a per-project settings file, but preferably some global settings file -- which I can use to force the server to only bind to 127.0.0.1 by default?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…