---
title: "How to configure a \"passive\" poller to work behind NAT"
description: "Configuring a passive poller behind NAT allows monitoring without port forwarding. The setup involves editing host files, adjusting merlin.conf, and ensuring SSH connectivity between master and poller."
url: "https://docs.itrsgroup.com/docs/faq/op5/360020252873-op5-monitor-how-to-configure-a-passive-poller-to-work-behind-nat/index.html"
---
## This procedure is **partly** supported

Articles in the "Unsupported Community Documents" space are normally not supported by ITRS support. This procedure is used for slim pollers, but we recommend avoiding it if possible for regular pollers.

This how-to will describe how to configure a "passive" poller that is located behind a NAT firewall where port forwarding is *not* possible. This is called running a passive poller. Running multiple poller nodes behind the very same NAT is not supported ? two nodes must not be seen at the same IP address, in the master's point of view.

Prerequisites
In this example we have a master server called *master01* and a poller called *nat\_poller* that is behind a firewall.

- The master server must be accessible on port 22 and 15551 from the poller.
- Basic understanding of op5 Monitor with master-peer configuration

## Steps

#### Important information in case of peered masters

If you have more than one master in your environment, the steps below that relates to "master01" also need to be performed on the peered master. You also need to "mon node add" the peered master.

1. On *master01*, edit the */etc/hosts* file using your favorite text editor, and map the hostname *nat\_poller* to the outgoing NAT IP address of *nat\_poller* (i.e. the IP address which the poller will connect from in the master's point of view). Example:

   ```
   192.0.2.34 nat_poller
   ```

2. On *master01*, set up the poller node *nat\_poller* by executing the command below.

   ```
   mon node add nat_poller type=poller hostgroup=nat_poller
   ```

3. On *master01*, edit the */opt/monitor/op5/merlin/merlin.conf* configuration file, and insert *takeover = no* and*connect = no* into the *nat\_poller* configuration block. Example:

   ```
   poller nat_poller {
       address = nat_poller
       port = 15551
       hostgroup = nat_poller
       connect = no
       takeover = no
   }
   ```

4. On *nat\_poller*, set up the master node *master01* by executing the command below.

   ```
   mon node add master01 type=master
   ```

5. On *nat\_poller*, edit the */opt/monitor/op5/merlin/merlin.conf* configuration file, and insert into the *master01* configuration block: a sub-block called *object\_config*, containing *fetch\_name* and *fetch* settings. Example:

   ```
   master master01 {
       address = master01
       port = 15551
       object_config {
           fetch_name = nat_poller
           fetch = mon oconf fetch master01
       }
   }
   ```

   The value of the *fetch\_name* setting should be set to the name of the poller.

6. On *nat\_poller*, disable any default nagios object configuration files by executing the command below.

   ```
   sed -i /^cfg_file=/d /opt/monitor/etc/nagios.cfg
   ```

7. On *nat\_poller*, verify and set up SSH connectivity by executing the command below.

   ```
   mon sshkey push --all
   ```

8. On *master01*, restart the op5 Monitor system services by executing the command below.

   ```
   mon restart
   ```

9. On *nat\_poller*, fetch the new configuration from *master01* by executing the command below.

   ```
   asmonitor mon oconf fetch master01
   ```


