I'm currently trying to connect to my Linux Mint guest via SSH on my Windows 10 host. Better said, I'm trying to connect to the guest successfully with particular firewall rules in mind.
Using Virtual Box, I've enabled a host-only adapter for the Linux Mint virtual machine.
When allowing any and all traffic through port 22 via the firewall with that particular allow all rule, I'm able to successfully connect to the guest machine using SSH from my Windows host.
However, I want the Linux guest to only accept my IP for SSH. In other words, I want it to only accept my IP for port 22 (if that makes any sense).
I configured the Linux firewall with these rules and could not then after successfully connect:
GUEST IP 22/tcp ALLOW IN HOST IP 22/tcp HOST IP 22/tcp ALLOW OUT GUEST IP 22/tcp
Note: The terms 'GUEST IP' and 'HOST IP' are simple placeholders for the associative IP address given the context. In this case, GUEST IP is the host-only adapter's IP address from the eth1 interface. Needless to say, the HOST IP represents the host IP address found on my Windows 10 host.
I've done what I can to make it so that it'd work, but I honestly don't know how to get what I'm asking for at this point.
My current setup:
- Windows 10 (Host) w/ MobaXtrem SSH client & FreeSSHd SSH server
- Linux Mint 17 (Guest) w/ openSSH client & sever
- Didn't touch the Windows firewall at all
- Currently have Linux firewall set to drop, but added in mentioned rules
I would like to let it be known that my experience with Linux/Unix based systems is very limited as it is with using shells, SSH, and configuring firewalls.
I literally just installed the mentioned SSH software a day ago.
TL;DR: I want to make it so that my Linux guest is configured to only accept SSH traffic from my host computer. I'm assuming this is done via IP but I'm not sure how to do it. After adding the above firewall rules to the Linux guest, connecting no longer became successful and every attempt would time-out.
Additional Info: - I have seen around these neck of the woods folks mentioning port forwarding; I tried it, didn't work. Seeing as how I was able to get it to work with the host-only adapter, I figured it'd be fine without that solution.
As an aside, is it possible at all to connect to my Windows host via my Linux guest using SSH? I tried doing it from my Linux terminal, but it kept saying I didn't have permission to do so.
If you need clarification or additional information, please feel free to ask.
Thanks in advance!