Skip to content

Instantly share code, notes, and snippets.

@ralvares
Created February 25, 2021 10:45
Show Gist options
  • Select an option

  • Save ralvares/009a3aa643e5cef9daf0d8c6a7c6230b to your computer and use it in GitHub Desktop.

Select an option

Save ralvares/009a3aa643e5cef9daf0d8c6a7c6230b to your computer and use it in GitHub Desktop.
DNSMASQ example
yum install dnsmasq -y
systemctl enable dnsmasq
cat > /etc/dnsmasq.d/ocp.conf << EOF
listen-address=127.0.0.1
bind-interfaces
addn-hosts=/etc/hosts.dnsmasq
address=/apps.ocp.ocp4.local/192.168.150.10
enable-tftp
tftp-root=/tftpboot
EOF
cat > /etc/hosts.dnsmasq << EOF
192.168.150.40 worker-0.ocp.ocp4.local
192.168.150.41 worker-1.ocp.ocp4.local
192.168.150.42 worker-2.ocp.ocp4.local
192.168.150.30 master-0.ocp.ocp4.local
192.168.150.31 master-1.ocp.ocp4.local
192.168.150.32 master-2.ocp.ocp4.local
192.168.150.20 bootstrap.ocp.ocp4.local
192.168.150.10 api-int.ocp.ocp4.local api.ocp.ocp4.local
192.168.150.10 bastion.ocp.ocp4.local
192.168.150.10 registry.ocp.ocp4.local
EOF
systemctl restart dnsmasq
firewall-cmd --permanent --add-service=dns
firewall-cmd --reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment