SO Linux
1. How to put wildcard entry into /etc/hosts?
References >
(dnsmasq) https://help.ubuntu.com/community/Dnsmasq
(unbuntu) https://askubuntu.com/questions/150135/how-to-block-specific-domains-in-hosts-file/150180#150180
(other) http://stackoverflow.com/questions/20446930/how-to-put-wildcard-entry-into-etc-hosts
It happens that /etc/hosts
file doesn't support wild card entries: you'll have to use other services like dnsmasq.
Ubuntu 17.04 example for an OpenShift Origin running on a VirtualBox VM: let's redirect all *.router.default.svc.cluster.local to 127.0.27.27
eg: https://jenkins-wildfly-test.router.default.svc.cluster.local/
DIDN'T WORK !!!!!!!!!!!!!!!!!!!!
Create a file:
$ sudo nano /etc/NetworkManager/dnsmasq.d/local
Then add the line:
address=/router.default.svc.cluster.local/127.0.27.27
Set up your connection to use localhost/dnsmasq for name resolution:
sudo nano /etc/NetworkManager/NetworkManager.conf
Add, to the [main] section, the line:
dns=dnsmasq
And restart service network-manager:
$ sudo service network-manager restart