Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Restrict ssh access by domain?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Restrict ssh access by domain?

craigcabreycraigcabrey Member
edited August 2011 in Help

Hi all,

Just wondering if it was possible to restrict access to my LEB's ssh server via DNS. So for example, I have three records associated with my domain: example.com, www.example.com, and server.example.com. example.com and www.example.com CNAME to server.example.com, but I would like it if I could only log in to SSH if I connected to server.example.com, not any of the others (or future ones for that matter).

Is this possible? Or is it just crazy talk?

Comments

  • KuJoeKuJoe Member, Host Rep
    edited August 2011

    It's possible if you set multiple IPs on your server on only allow connections from the IP associated with server.example.com. To my knowledge SSH is handled by IP and not FQDN so DNS would only have a hand if the FQDN was for a single IP no other domain shared.

  • Possibly with ssh running under xinetd.

    With xinetd set only_from = server.example.com

    & the reverse lookup should be server.example.com

    I haven't tried it.

  • KuJoeKuJoe Member, Host Rep

    only_from works for the connecting IP/Domain though so it won't work in that case.

  • Well it was worth a try. Oh well.

Sign In or Register to comment.