Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. Restricting the SSH port to the public IP address of the VPN

Restricting the SSH port to the public IP address of the VPN

Scheduled Pinned Locked Moved Solved Support
sshubuntufirewall
3 Posts 3 Posters 401 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • matix131997M Online
    matix131997M Online
    matix131997
    wrote on last edited by matix131997
    #1

    Welcome,
    I am in the process of looking for a solution to restrict the SSH port outside the firewall, as it is known to be dynamically changed by Cloudron.

    After removing the support for TCP Wrappers, I searched for various solutions on how to restrict access through configurations in ‘sshd_config’. The result? Not satisfactory. Completely nothing worked.

    While browsing around here and I found a post that you can edit the ‘/home/yellowtent/platformdata/firewall/ports.json’ file and then this will add to the dynamic firewall system.

    I was pleased to see that this is a possibility, but a question. Can I add with a public IP address?

    Why am I doing this? I want to migrate a server to my country that don't have a firewall system, like at Hetzner, where on all servers I restrict port 22 to a VPN address for security.

    1 Reply Last reply
    2
    • A Offline
      A Offline
      adhodgson
      wrote on last edited by
      #2

      I don't think this is possible unless there is a document I have missed somewhere. I wanted to do this myself for the same reason. I ended up moving SSH to port 202 and disabling password authentication, this has cut down all the SSH connection attempts. Cloudron configures the firewall to allow inbound port 202, no need to explicitly allow that port.

      1 Reply Last reply
      2
      • girishG Offline
        girishG Offline
        girish
        Staff
        wrote on last edited by
        #3

        We haven't added a way to add custom persistent iptables rules . For SSH though, just move it port 202 and disable root auth and password auth. This usually cuts down all bots to 0.

        1 Reply Last reply
        0
        • J joseph marked this topic as a question on
        • J joseph has marked this topic as solved on
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Bookmarks
        • Search