---
title: "Configuring NetMirror"
canonical: "https://thoughtdata.refined.site/space/TUD/55186113/Configuring%20NetMirror"
format: markdown
---
**Pre-Requisite:** Before you begin to configure your NetMirror software on your application server VM, you will have to identify the virtual NIC/interface on which you intend to monitor the traffic. (for E.g.: eth0, eno1, enps10f0 etc)

NetMirror agents send captured traffic streams to sensor, hence you should have an up and running sensor prior to setting up your NetMirror agents. 

Few files in the configuration directory must be changed as described in the following sections to set the configuration that enables NetMirror functions.

Go to "**cd /usr/local/thoughtdata/netsense/etc" **directory

Edit the file **td_net_mirror.cfg** by running **"vi td_net_mirror.cfg"** 

![image](media://46ed0583-5815-4638-9a71-8ad050dfe091)

Configuration of the NetMirror

A sample template line is provided, replace the line by providing a proper adapter name, remote ip and remote port. Adapter name is the name of the ethernet virtual NIC on your application server which you intend to monitor. Remote IP address is the IP address of your software sensor running outside the application server VM but within your IT network. Remote port number is the number on which your remote sensor will listen to the traffic stream sent by the NetMirror. You may choose any port number outside the standard port range(For E.g.: 3001), however you will need to remember the port number as this information will be needed to finish the configuration on the sensor side to listen to NetMirror agents. A sample line in **"td_net_mirror.cfg"** will look like **"eth0:192.168.1.134:3001".** Save and exit the file by running **"Esc" ":" "wq!"**

Go to the directory **"cd /usr/local/thoughtdata/netsense/bin"**.

Run ".**/start_nm"** to start the NetMirror process

run **"./ps"** to view the running NetMirror process

Optionally if you have setup NetMirror as a service, you can stop and start NetMirror from next time post reboot of your application server by running **"service stop tdnetmirror" **and **"****service start tdnetmirror"**

Your NetMirror configuration is now completed and up and running. If you have registered NetMirror process as a service, NetMirror will auto start on each reboot of your application server VM.

**Note:** NetMirror communicates to on the port you have chosen in NetMirror configuration. The port number should be open for communication between NetMirror and Netsense if there is firewall in between NetMirror and .