We’re rewarding the question askers & reputations are being recalculated! Read more.

New answers tagged

0

this is quite late response, but I just did what you've asked and it works for me. I'm using VPN connection to get access to my office which is running on ppp0 interface. I've run below and now I can access hostnames which are only available via vpn, without setting up option to send all traffic through VPN. /sbin/route add -host -interface


1

If you are modifying /etc/hosts in the Docker container itself, then only processes within the Docker container are going to be able to resolve that domain locally. Thus, if you are using a browser on your Mac to access a port exposed by Docker, it knows nothing about the DNS override and will try to hit the real site -- which likely explains the message ...


1

Edit your hosts file: sudo vi /etc/hosts Add URLs you want to block. This should be sufficient: # Block YouTube 127.0.0.1 youtube.com 127.0.0.1 www.youtube.com 127.0.0.1 youtu.be 127.0.0.1 www.youtu.be 127.0.0.1 youtube-nocookie.com 127.0.0.1 www.youtube-nocookie.com Reset the Directory Service cache dscacheutil -flushcache Ping the the hosts for ...


Top 50 recent answers are included