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

DNAT for Ping to internal address

Dear All,

I have several DNAT entries for each of my public IPs that point to different machines (i.e. I have http and SMTP/POP3 on the same external IP but 2 different internal IPs).  The problem I have is that one of the machines is a bit unstable and I need to monitor it remotly.  I need to be able to ping one of the machines using the external address but have not been able to workout how to do it.

I thought I had it using ping_request and ping_reply and to start with I had both and it worked.  I was then not sure if I needed both so I took ping_request out and it stopped working, however, when I put it back in it still did not work.
If I DNAT no chage to the internal address I can ping it no problem, but I dont have enough external IPs for that.

Any body know what I should be doing?

Thanks


This thread was automatically locked due to age.
  • Why not approach the problem from the opposite direction?

    Instead of trying to ping in through the firewall from the outside, and then forwarding the ping to your unstable machine, why not have the unstable machine send a ping or some kind of custom hearthbeat packet out to the machine elsewhere that is monitoring it? If you do it that way, you can monitor any number of machines on the internal network from the outside world.
  • You also could use something that does a tcp connect to the services you are trying to check (assuming those services are exposed on the external ip).

    That will let you check the services, instead of just that the machine is pingable.

    Barry
  • Hi,

    Thanks for the coments.  I already have NAGIOS setup on another machine on another network.  It will be connecting via HTTP and HTTPS to check that the webserver is up, but when a service fails the Nagios system does a ping check to make sure it is not the host that has failed so it can report either the service if the host is up or the host if not.

    This is why I need the ping to get there and back.

    Thanks
  • Well, you might be able to use DNAT/SNAT to forward the ICMP ping packets, but I don't know if it'd work or not...
    Looks like you can put Ping in the DNAT/SNAT service settings; try it.

    Another option would be to get your ISP to let you set your ASL box as the gateway for your network, but you'll need more IPs to do that, and cooperation from your ISP. (Unless you already have a router which you could remove and plug ASL in its place.)

    Barry
  • Hi,

    Not sure what I did before, but had another look and put 

    All -> vhost_4 / ping-request  None    internal_4

    and can ping the server from the internet.  I am sure I tried that before, but perhaps something else was not right.

    Thanks for the suggestions anyway.