Guest User!

You are not Sophos Staff.

This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Cannot SSH into hosted VMs when connected via L2TP VPN

Here is my setup:
UTM 9.004034

In the internal network, I have a server running Windows 7 professional. The IP address of server is 192.168.200.14. On this server, I run VirtualBox. The VirtualBox network adapter is bridged to the NIC on the server.

Within VirtualBox, I have created a VM. This VM can be accessed via SSH on the internal network. The IP address of the VM is 192.168.200.42. 

When I am connected via L2TP VPN (10.242.3.2), I cannot access this VM via SSH. I cannot even ping this VM. I can access the server using RDP without issues. But any VM hosted on the server is inaccessible. 

The VPN connection is established on my Android phone and I use an app ConnectBot for SSH. When the phone is connected to internal network over WiFi, I can access the VM just fine using this app. So it is clear that something in firewall is blocking SSH. I checked the logs and nothing.

So I created two DNAT rules:

Traffic selector: VPN Pool (L2TP) : ping : VM IP address
Destination translation: Server IP address: ping
Automatic Firewall Rule: Yes

Traffic selector: VPN Pool (L2TP) : SSH : VM IP address
Destination translation: Server IP address: SSH
Automatic Firewall Rule: Yes

With the first DNAT rule enabled, I can now ping the VM. I still cannot SSH into it. Is there any other DNAT rule/firewall rule required? I have been struggling for several hours but cannot make this work.

VPN --->internet--->UTM9->Server->VM on server


Thanks...
Arun


This thread was automatically locked due to age.
  • When there is no entry in firewall-log or ips-log the utm isn't blocking your connection.
    I never solved VPN-access through NAT. The only thing I have to do is to set up a firewallrule to allow traffic from VPN-network to special devices or a network.

    Which gateway is configured in the VM?
    Is 'Automatic Firewall rules' activated for L2TP VPN?
  • I agree with GMF - you should delete those NAT rules.

    If there's nothing in the UTM logs (Firewall and Intrusion Prevention), I think you have a routing problem outside the UTM.

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • I logged the initial packets in the NAT rule and the log shows that the rule is being used. I have a suspicion that firewall logs are not telling the whole story. Except firewall, everything else is turned off. I have several other NAT rules and they are working fine for VPN. Only SSH seems to be problematic. I will continue to test and post if I find something. 

    Thanks much for the reply...
  • Resolved the problem. It was due to setup of the VMs. These VMs run Oracle clusterware which requires two NICs in each VM. First NIC eth0 is the public NIC which is assigned the IP address from 192.168.200.0/24 subnet. The second eth1 NIC is used as private NIC which is assigned IP address from 10.0.0.0/8 subnet. 

    The it was the subnet 10.0.0.0/8 which was creating problem. Whenever I pinged the IP 10.242.3.2 from any of the VM, the interface eth1 would respond. Since eth1 is purely for node-to-node communication, it is not assigned a default gateway and it cannot be accessed in any way except from node to node. The connection attempt via SSH would fail.

    I changed the subnet from 10.0.0.0/8 to 10.1.1.1/24 at both NIC and Oracle level and the VMs are now accessible over VPN. I do not even need the DNAT rules.
Share Feedback
×

Submitted a Tech Support Case lately from the Support Portal?