Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: Document how to change the Cockpit TCP port #1584

Closed

Conversation

stefwalter
Copy link
Contributor

No description provided.

@stefwalter
Copy link
Contributor Author

the desired TCP port.</para>

<programlisting>
$ semanage port -a -t cockpit_port_t -p tcp 443

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

semanage port -a -t websm_port_t -p tcp 443

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed. Thank you.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use this:

# make cockpit listen on a different port
cockpitPort="9091"
cockpitSocketFile="/etc/systemd/system/cockpit.socket"

semanage port -a -t websm_port_t -p tcp "$cockpitPort"
rm -f "$cockpitSocketFile"
cp /lib/systemd/system/cockpit.socket "$cockpitSocketFile"
sed -i "s/9090/$cockpitPort/" "$cockpitSocketFile"
systemctl daemon-reload
systemctl restart cockpit.socket
for i in "" "--permanent"; do \
  firewall-cmd \
    --add-port="$cockpitPort/tcp" \
    $i; \
done

@stefwalter
Copy link
Contributor Author

Made change that @fhuberts pointed out.

@stefwalter stefwalter deleted the document-port-change branch December 15, 2014 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants