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

NAT setup

I'm sure I'm just missing something small here. 

I am trying to setup a NAT so a consultant can SSH into a device for support. Here is the NAT rule I created. 

Traffic Source : public IP 200.x.x.x
Traffic Service:  SSH
Traffic Destination: public interface (WAN) of Astaro 165.x.x.x
Mode: DNAT
Destination: internal device 172.x.x.2
Destination Service: SSH

Log initial packets and auto packet rule checked. 

At first the problem connection was the packet filter not liking the higher ports that SSH (Putty) was using, but a rule modification fixed that. 

Now when SSH (Putty) is launched, the error generated is no route to host. 

Astaro has a route from itself to the device. 

I'm sure it's something simple, but it's hiding from me at the moment. 

Thanks in advance.


This thread was automatically locked due to age.
  • Hi, 200.x.x.x is the consultant's IP?

    I've successfully used port 2222 for an external DNAT to internal port 22, you might need to do that if you have Astaro's SSH server enabled.

    Barry
  • No. 200.x.x.x is one of my IP in a public block.

    *Internet -> 200.x.x.x/27 ->165.x.x.x (ASG WAN interface) -> 172.x.x.x (ASG LAN Interface) -> My private network. 

    My ISP sends all of my 200.x.x.x/27 to 165.x.x.x. interface.
  • Hi, then the SOURCE needs to be either ANY or the consultant's IP, NOT the 200.x.x.x IP.

    Barry
  • Made the change using "ANY" as the source. No improvement. Still "no route to host" when try to Putty to 200.x.x.x

    When I Putty to 165.x.x.x, (Astaro WAN interface) the NAT works. 

    How can I get anything with 200.x.x.x to NAT to something with an internal address? 

    For instance, I have 6 video cameras using H323. I want to give them each a public IP and NAT at the Astaro. Camera1 get IP 200.x.x.1, Camera2 200.x.x.2..etc. 

    Each is going to use the same protocols for connection, so I need the Astaro to NAT by IP. Would I use DNAT for that? 

    Thanks. 

    -Mark
  • It sounds like you need to do one of the following:

    1. add each of the 200.x.x.x IPs to your EXT interface as "additional IP addresses", with a DNAT for each.

    OR

    2. use the 200.x.x.x addresses on your Internal computers, instead of using 172.x.x.x internally. You might want to have a DMZ if you're hosting public servers.
    Astaro should be able to route this automatically, without NAT, if you change the internal interface and network to the 200.x.x.x addresses.

    Barry
  • So just to clarify, if I add each 200.x.x.x/27 as an additional IP on the external interface, when the NAT rules says 

    Traffic Source : ANY
    Traffic Service: H323
    Traffic Destination: public interface (WAN) of Astaro (Virtual) 200.0.0.1
    Mode: DNAT
    Destination: internal device 192.x.x.1 (Camera1)
    Destination Service: H323

    Traffic Source : ANY
    Traffic Service: H323
    Traffic Destination: public interface (WAN) of Astaro (Virtual) 200.0.0.2
    Mode: DNAT
    Destination: internal device 192.x.x.2(Camera2)
    Destination Service: H323

    etc...

    Then the Astaro will listen for anything on 200.x.x.x/27 and NAT send to the right private host? 

    I think the fog is lifting. 

    Thanks.
  • Just answered my own question. 

    I set up additional IP on external interface of 200.0.0.200

    Traffic Source : ANY
    Traffic Service: SSH
    Traffic Destination: public interface (WAN) of Astaro (Virtual) 200.0.0.200
    Mode: DNAT
    Destination: internal device 172.x.x.x 
    Destination Service: SSH

    SSH to 200.0.0.200 now works as desired instead of having to SSH to 165.x.x.x. 

    The only other thing I had to do for this connection was a packet filter rule as Putty SSH was calling for another random port to be used (59560) as well as port 22. 

    I can live with that. 

    Thanks for the help.
  • The only other thing I had to do for this connection was a packet filter rule as Putty SSH was calling for another random port to be used (59560) as well as port 22.


    You shouldn't need another rule...
    Are you using the built-in SSH service definition?

    Barry
  • Yes. Packet filter live log shows source trying to connect on 22 (which it allows) and  higher port (59560 in one instance, but it changes) which gets denied. 

    I'm thinking cipher handshake?
  • And those are both the DEST ports? Or is the high one the source port?

    Barry