Find the answer to your Linux question:
Results 1 to 4 of 4
Hi, I have a server that is used for VPN, so it is attached to an external IP and an internal IP. I would like to make it so that ...
  1. #1
    Just Joined!
    Join Date
    Oct 2006
    Posts
    4

    ssh only accessible from internal

    Hi,

    I have a server that is used for VPN, so it is attached to an external IP and an internal IP. I would like to make it so that I can only ssh into it using the internal IP (for security purposes). Is there a way to prevent ssh from allowing connections on one of its IP's?

    Thanks for the help,
    Eric

  2. #2
    Linux Newbie framp's Avatar
    Join Date
    Jul 2006
    Location
    Stuttgart, Germany
    Posts
    240
    Have you checked hosts.allow and hosts.deny?
    "Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect." Linus Benedict Torvalds

  3. #3
    Linux Guru
    Join Date
    Nov 2004
    Posts
    6,110
    You should be able to specify only one subnet to allow, which would effectively block out the external connections.

  4. #4
    Just Joined!
    Join Date
    Oct 2006
    Posts
    4

    thanks, it worked

    I got it working thanks. What I did was to edit the hosts.allow and the hosts.deny with the following:

    hosts.deny:
    sshd: ALL

    hosts.allow:
    sshd:192.168.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...