Is it possible to configure puppet to run on any particular port?
Say if I need an agent to run under port 40000 - is it possible?
Well, it's the master that listens on a port (by default, 8140), whereas the agents open the connections back to the master.
If you wanted to change the master's port, run this on the master:
# puppet config set masterport 40000
This command will edit your puppet.conf
file, which lives in $confdir.