Opening a portΒΆ
Ensure the
salt-master
can be brought up with vagrant locally:vagrant up salt-master
vagrant ssh
intosalt-master
and confirm the service in question is running and listening on the desired port:vagrant ssh salt-master sudo netstat -tlnp | grep 9001
Should show something like:
$ tcp 0 0 0.0.0.0:9001 0.0.0.0:* LISTEN 621968/nginx: maste
Check the firewall to confirm the desired port is closed
sudo iptables -L -xvn
Should show something like:
$ 86131 5167860 ACCEPT tcp -- * * 192.168.50.0/24 0.0.0.0/0 state NEW tcp dpts:9000
In the local repository, edit the firewall settings by navigating to
pillar/base/firewall
and editing thesalt.sls
file to include the desired port:vim pillar/base/firewall/salt.sls
On the
salt-master
runhighstate
to validate your changes and check the firewall to verify those changes:vagrant ssh salt-master sudo salt-call state.highstate
sudo iptables -L -xvn
Should show something like:
86131 5167860 ACCEPT tcp -- * * 192.168.50.0/24 0.0.0.0/0 state NEW tcp dpts:9000:9001