Guest User!

You are not Sophos Staff.

[7.480][BUG][FIXED] Unable to SSH to hosts behind Astaro

Since upgrading to 7.480 using up2date I have been unable to ssh to any host behind my astaro firewall.

Packet Filter log shows the following (With x's substituted):

SSH connection attempt  TCP  120.138.22.x:55703 →  210.48.13.x:22


I believe this "SSH connection attempt" is related to a Brute Force prevention system. However i can't find any mention of this in Astaro's control panel and this is blocking access to all internal hosts from all (Tested) external hosts.

Specific setup has internal host (172.30.10.20) Masquerading behind an "Additional" external IP (210.48.x.x). All traffic for this external IP is DNATed to the internal host.

Packet Filter rules are set giving services I wish to allow (In this case SSH and HTTP) access from the internet directly to the internal host. HTTP is working as expected.

For troubleshooting I have also created an allow "Any Any SSH" rule, disabled IPS and Intrusion Anti-Portscan as well as creating a straight DNAT rule to exclude the Additonal IP as the cause. I have also rebooted.
  • This is not a DNAT issue. There are no rules specific to SSH and other services are working correctly. It was also working fine before the upgrade. I have tried creating a SSH rule but this has no impact.

    Full line from an example drop is:

    2009:08:14-22:13:58 skywalk ulogd[3484]: id="2001" severity="info" sys="SecureNet" sub="packetfilter" name="Packet dropped" action="drop" fwrule="60004" seq="0" initf="eth1" outitf="unknown" dstmac="00:0c:29:f6:af:82" srcmac="00:00:00:00:00:00" srcip="120.138.22.37" dstip="210.48.13.128" proto="6" length="60" tos="0x00" prec="0x00" ttl="55" srcport="32842" dstport="22" tcpflags="SYN" 


    Thanks,
  • 60004 is an INPUT rule so I'd expect 210.48.13.128 is a local address, isn't it?
    Can you please specify where you wanted to ssh to?
  • 60004 is an INPUT rule so I'd expect 210.48.13.128 is a local address, isn't it?
    Can you please specify where you wanted to ssh to?


    In this case 210.48.13.128 is an additional WAN IP. This is DNATed to 172.30.10.20 (Any service). Packet Filter rules then allow SSH and HTTP access to 172.30.10.20.

    I have several servers behind the astaro providing several services (Mail, Web, Terminal Services) these all also work correctly. SSH appears to be forwarded to the Astaro console bypassing the DNAT rules. 

    When the remote access console is disabled this results in the "SSH Connection Attempt" log entry shown above and client is unable to connect. When console is enabled traffic is directed to the astaro console login.
  • here you go:

    2009:08:14-09:21:43 mi-amigo ulogd[3252]: id="2001" severity="info" sys="SecureNet" sub="packetfilter" name="Packet dropped" action="drop" fwrule="60004" seq="0" initf="eth1" outitf="unknown
    " dstmac="00:30:18:xx:xx:xx" srcmac="00:00:00:00:00:00" srcip="193.128.***.198" dstip="78.86.187.***" proto="6" length="48" tos="0x00" prec="0x00" ttl="116" srcport="28487" dstport="22" tcpf
    lags="SYN"
  • Ok, thank you. Things cleared up now.
    This is a regression that came in with a fix for another issue in 7.470. 
    As you stated chippo305 DNAT for ssh is bypassed actually.
    Sadly this can't be workarounded easily on ASG side since the bypassing 
    rule is called at the very beginning of that chain.
    But you may use another port for ASG ssh and the DNAT rule
    to restore the wanted behavior.
  • Confirmed. Resetting the Astaro SSH Shell port to a non-standard port allows SSH DNAT access to internal hosts.

    It is then possible to create a DNAT rule from the external IP (Port 22) to the internal IP (Port 2222) to restore port 22 access to astaro which for me is the expected behavior.

    Many thanks for your assistance.
  • work around;

    put astaro on another ssh port like 2222

    use normal ssh to go to your web box

    then from your web box use 

    ssh loginuser@yourastaroboxlocalipnumber -p 2222

    to connect back to your astaro box

    works for me [:)]