Can't SSH in from outside local network

  • Hey everyone,

    I finally got a lovely up and running version of OMV, with all my containers and certificates for my own domain.


    However I cannot ssh into my server now from outside my network.


    • I am running OMV 5 on RP4.
    • I have changed my ssh port to 25 (in omv)
    • I have tried using that port in my shell. It just times out though.
    • I can ssh in with this port on my local network.
    • I have created an SSH key and imported it into OMV.
    • Even trying to ssh in with just the IP address does not work either.

    Have I missed something? As with a previous setup, not OMV I could ssh in by just using the url for my site.

  • Using port 25 might be conflicting with postfix that also uses that port. Telnet to that port and see what answers.


    You don't say what you mean by "outside my network." If you mean from out on the internet, many ISPs block port 25 in both directions. Does yours?


    If your OMV has a private IP address, then there is no need to change the ssh port. Why are you doing this?

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • It isn't conflicting, i've forwarded the port and checked on canyouseeme and it can be reached.


    By outside my network, I mean the internet.


    The SSH didn't work prior to changing either.

  • Exactly what your configuration is is not clear enough for me to comment further.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • What info would you like? I am happy to provide as much or as little information as you need? I appreciate any help you can offer.

    Everything. What port forwards from your router are set, what ports on OMV do sshd and postfix run on, what OMV users belong to the ssh group. What is displayed when you try to connect and from where are you trying to connect from. What you expect to accomplish by changing the port a service runs on. Does it work partially or not at all.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • Hi Apologies for the delay, I was away on a work trip which meant I could not provide the information you requested.




    What port forwards from your router are set

    443

    80

    25



    what ports on OMV do sshd and postfix run on

    SSHD 25

    I don't use postfix



    what OMV users belong to the ssh group

    two users who have full rights to everything

    What is displayed when you try to connect and from where are you trying to connect from

    Connection refused.

    I am trying to connect via VPN from a hotel or just anoter wifi network.


    What you expect to accomplish by changing the port a service runs on

    Less people trying to brute force their way in.

    Does it work partially or not at all.

    running ssh username@192.168.0.33 -p 25 inside my network works fine.

    However running:


    ssh username@mydomain.name -p 25

    or

    ssh username@myserverip -p 25


    Does not work.


    I access OMV via subdomain, which I thought was the problem also, but running username@sub.domain.name -p 25 does not work either.

  • Postfix is a required by OMV package. It runs on TCP port 25. OMV runs sshd on port 22 by default. If you change this to port 25 you should expect to have problems.


    Not exposing port 22 to the internet makes sense as does changing the exposed port on the router to something else. But there is no need to change the port the service runs on on OMV if it is behind the router on a private IP address.


    What you should be doing on the router is forwarding external port 25 to internal port 22 and leave OMV running sshd on the default port 22. But you first need to verify that your ISP does not block port 25. Or just pick some other port to use that you know isn't blocked.


    Are you trying to connect to ssh username@myserverip -p 25 from inside the LAN? Many routers do not support this.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!