How to open up firewalld to allow Mosh on CentOS 7

By   10-14-2017 · 1 minute read · 109 words

If you use intend to Mosh on CentOS 7 you’ll need to open up UDP ports (60001-60009) through firewalld. Here are directions on allowing the port range through firewalld on CentOS.

Add the following mosh.xml file:

<?xml version="1.0" encoding="utf-8"?>
  <description>Mosh ( is a free replacement for SSH that allows roaming and supports intermittent connectivity.</description>
  <port protocol="udp" port="60001"/>
  <port protocol="udp" port="60002"/>
  <port protocol="udp" port="60003"/>
  <port protocol="udp" port="60004"/>
  <port protocol="udp" port="60005"/>
  <port protocol="udp" port="60006"/>
  <port protocol="udp" port="60007"/>
  <port protocol="udp" port="60008"/>
  <port protocol="udp" port="60009"/>

to /etc/firewalld/services/

Load the service into firewalld:

firewall-cmd --zone=public --add-service=mosh --permanent

Then reload the service:

firewall-cmd --reload

Mosh should now work on the client end.

firewalld   ssh   centos  

comments powered by Disqus