> For the complete documentation index, see [llms.txt](https://docs.editran.onesait.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.editran.onesait.com/documentacion-editran/px-5.2.1-en/configuration/configuracion.md).

# Editran/PX configuration

The configuration of **Editran/PX** is defined in the file `ediproxy.cfg` which is located in the product installation directory.\
Although it is common to use the included graphical tool to configure the system, it is also possible to edit this file manually.

As an example of the desired configuration of **Editran/PX** a scenario is shown in which an entity has to manage a large number of sessions and concurrent connections.\
In this case, it is proposed to deploy several instances in the client's internal network **Editran** active, each one serving a predefined set of sessions. The component **Editran/PX** will be the one that collects incoming connections and determines the instance **Editran** responsible for that session.

![scenario](https://944169240-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Bgxolt1oQVu07Im3iZJ%2Fuploads%2Fgit-blob-1ef7a9fd3ec3e63dc4b4146e36d55b9d2882eb07%2F01_escenario.png?alt=media)

## Graphical interface

The compatible Java version for the product is **Java 21** or higher.\
To open the graphical interface, follow these steps:

* On **Linux** it is necessary to have a graphical environment installed. If this requirement is met, simply open a terminal, go to the installation directory of **Editran/PX** and run:\
  `java -jar ConfigurarProxy.jar`
* On **Windows** access is done from the programs menu, selecting **EditranPX Configuration**.\
  ![configuración](https://944169240-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Bgxolt1oQVu07Im3iZJ%2Fuploads%2Fgit-blob-cc44171f9165108269cb417749606b305c6bc419%2F10_shortcut.png?alt=media)

  As an alternative, it is possible to open a command line window (CMD), go to the installation directory of **Editran/PX** and run:\
  `java -jar ConfigurarProxy.jar`

In both cases the menu shown is:

![configuration](https://944169240-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Bgxolt1oQVu07Im3iZJ%2Fuploads%2Fgit-blob-b813642fa29c0715fa608829e5794cb75cc1b4b6%2F02_configuracion.png?alt=media)

* In the table **Proxy listening ports** the different listening ports of **Editran/PX**.
* Selecting each listening port shows in the table **Host for each listening port** the different hosts **Editran** assigned to that port.\
  **Editran/PX** will try to send to the first of the hosts listed in the table, considered the main host. The following hosts will act as backup hosts.
* In the table **Entities for each listening port** the entity codes associated with each listening port of **Editran/PX** selected and are used to set filters in the routes. Their definition is useful in installations in which the same **Editran/PX** manages several instances of **Editran**.
* At the lower central part of the window is the section in which, depending on the selected option, it is possible to configure:
  * **Allowed IPs**: Local network IP addresses, different from those already defined as hosts, that need to connect to the Proxy. If the list appears empty (default case), only the IPs defined as hosts will be allowed. External IPs are not filtered by this list.
  * **IPs not logged**: Local network IP addresses whose access to the Proxy should not be recorded in the log files.

### Add Proxy listening port

To add a new listening port, click the button **Add listening port**, where the IP and Listening Port fields of **Editran/PX** and Host IP and Port to which **Editran/PX**.

![add listening port](https://944169240-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Bgxolt1oQVu07Im3iZJ%2Fuploads%2Fgit-blob-cf76dad494c387d235558fe8c5b943c7ce84747e%2F09_nuevo_puerto_escucha.png?alt=media)

### Edit Proxy listening port

To edit the listening port, double-click in the table on the listening port you want to edit. We can modify the IP and Listening Port fields of **Editran/PX** for the selected listening port.

![edit listening port](https://944169240-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Bgxolt1oQVu07Im3iZJ%2Fuploads%2Fgit-blob-6798e75b670adf0a44f230d395113439205312a0%2F04_editar_puerto_escucha.png?alt=media)

### Delete Proxy listening port

To delete a listening port, select a port and click the button **Delete listening port**. Note that the information of the hosts and entities associated with this listening port will also be deleted.

### Add host to a listening port

Select in the list of **Proxy listening ports** the port to which you want to add a new host and click the button **Add backup host**.\
The new host will be added as a backup host, placed at the end of the existing list. If you want to change the order - both of the main host and the backup hosts - you must delete them and add them again in the desired order.

### Modify host of a listening port

To modify a host, simply double-click it in the table.\
This will open a pop-up window where the different host fields can be edited.

### Delete host from a listening port

To delete a host, select it in the table and click the button **Delete host**. A host cannot be deleted if it is the only one associated with the listening port, since each port must always have at least one configured host.

### Add allowed IP

To add an internal IP that will be allowed to connect to the ports of **Editran/PX**, enter the address in the field **IP to add** and click the button **+**. The IP will be added to the combo box, where all allowed IPs are shown.

![allowed IPs](https://944169240-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Bgxolt1oQVu07Im3iZJ%2Fuploads%2Fgit-blob-e26f8187de3afbc0c65d433ed05749f498d08089%2F06_ip_permitidas.png?alt=media)

> Examples of allowed IPs:\
> `172.22.240.2`: Connection from server **Editran** that is at address `172.22.240.2`\
> `172.22.240`: Connection from any server is allowed **Editran** that is in subnet `172.22.240`

### Delete allowed IP

To delete an IP, select it in the combo box and click the button **-**. The selected IP will disappear from the list of **Allowed IPs**.

### Add IP not logged

To add an internal IP whose activity we do not want to appear in the log of **Editran/PX**, enter the address in the field **IP to add** and click the button **+**. The IP will be added to the combo box **IPs not logged**.

![IPs not logged](https://944169240-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Bgxolt1oQVu07Im3iZJ%2Fuploads%2Fgit-blob-aedfae57c133c1baae6c2fec740b5a3da85f889d%2F11_ip_sin_log.png?alt=media)

### Delete IP not logged

To delete an IP, select it in the combo box and click the button **-**. The selected IP will disappear from the list of **IPs not logged**.

### Add entity to a listening port

The entity codes associated with the listening port of **Editran/PX** serve to set filters in the routes of installations in which the same **Editran/PX** manages several instances of **Editran**.\
To add an entity, first select the listening port of **Editran/PX** to which it will be associated and, then, click the button **Add Entity**. Next, it is possible to choose between adding a single entity or a range of entities. In the case of ranges, a minimum value and a maximum value must be indicated. It is also allowed to leave one of the ends unspecified:

* If the maximum value is left blank, the range will run from the indicated minimum value to the last possible value.
* If the minimum value is left blank, the range will cover from the first available entity value to the specified maximum value.

![entities](https://944169240-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Bgxolt1oQVu07Im3iZJ%2Fuploads%2Fgit-blob-77bbf16e5cc17699b3334a2a834dfd906dd806e1%2F07_nueva_entidad.png?alt=media)

#### Check Local

The entity codes entered by default are interpreted as remote entity codes unless the check **Local**. When this option is checked, the configured codes are considered local codes.

![local entities](https://944169240-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Bgxolt1oQVu07Im3iZJ%2Fuploads%2Fgit-blob-9deebe89b8f98f27d0fe86fa1a353ee1925d5e72%2F05_entidades_locales.png?alt=media)

### Modify entity of a listening port

To modify an entity, double-click the range or entity field you want to change. The same window as in the section **Add entity** will appear and the procedure will be the same as in the previous case.

### Delete entity from a listening port

To delete an entity, simply select it and click the **Delete Entity**.

## Configuration files

### Main Editran/PX configuration: ediproxy.cfg

The configuration file is structured in sections, and each section corresponds to a specific route.

> ℹ️ *Note:* A route is the association between a **Editran/PX** port **Editran** and the hosts

to which the remote connections received on that port will be routed.

```
[<ip>:<port>]
...
[]
```

Inside each section, the parameters applicable to each route are defined. Each parameter must be specified on a line with the following structure:

```
<name> = <value>
```

The possible parameters are:

* **entity**: Indicates the entity codes with access to the server **Editran** of the route. This parameter is optional; if defined, incoming connections will be identified and filtered according to the configured values.
* **type**: Only applies if a filter by entity codes is defined for the route. In these cases, this parameter indicates whether the code to be examined is the remote code (default) or the local one (local type).
* **editran ip**: Indicates which Editran server or servers **Editran** (also called host in this manual) incoming remote connections that reach the proxy IP and port are routed to. It is mandatory to define at least one server for each route.

In applicable cases there may be several lines for the same parameter, for example, when the number of entities is high and the maximum allowed line size (512) is exceeded.

The following sections describe examples that explain how entities and servers can be parameterized.

**Configuration example with filter by listening port.**

```
[srvpx1:7777]
editran ip = srveditran1, srveditran3:7777
[]

[srvpx1:7778]
editran ip = srveditran2
editran ip = srveditran3:7778
[]
```

In the example, connections are routed to `srveditran1` or `srveditran2` depending on whether they arrive at port `7777` or at `7778`.\
In both cases, since no server port is specified **Editran**, the default value will be set (`7777`).\
In both routes, a backup editran server is configured to which connections are passed when the connection to the main one fails. In the example, the backup server is `srveditran3` with different ports and is specified in two different but equivalent ways: in the first as a list of comma-separated values and in the second on different lines.

**Configuration example with filter by remote entity.**

```
[srvpx1:7778]
entity = 000001250, 000001550
editran ip = srveditran1:7777
[]

[srvpx1:7778]
editran ip = srveditran2:7777
[]
```

In this example, the connections that arrive at port `7778` are distributed to two editran servers depending on which entity is connecting, if it is the `125` or `155` they will be passed to `srveditran1` and the rest to `srveditran2` since no other entity filter has been specified.\
It should be noted that routes are applied in the order in which they appear in the file, that is, if in this case they were reversed, all connections would be passed to `srveditran2` and the filter would have no effect.

**Configuration example with filter by local entity.**

```
[srvpx1:7778]
entity = 000001250
type = local
editran ip = srveditran1:7777
[]

[srvpx1:7778]
entity = 000001350
type = local
editran ip = srveditran2:7777
[]
```

In this example, the entity codes specified are those associated with the own servers, that is, they are local codes. In the example, connections arriving for code `srveditran1` will be passed to `125` and those of `srveditran2` to `135`.

**Configuration example with filter by range of entities.**

```
[srvpx1:7778]
entity = 000001250, 0000001550
entity = :000001240
editran ip = srveditran1:7777
[]

[srvpx1:7778]
entity = 000005990:000006990, 000007990:
editran ip = srveditran2:7777
[]
```

This example shows the possibilities of specifying, in addition to what was seen in the previous example, ranges of allowed entities. With this configuration:

* The entities `125`, `155` and any whose code is between `1` and `124` (range without minimum value `:000001240`) are directed to instance **Editran** `srveditran1`.
* With the second route, two valid ranges are established for server `srveditran2`, one for the entities with code between `599` and `699` and another for any entity whose code is greater than `799` (range without maximum value `000007990:`).
* For the rest of the entities, the connection will be rejected and it will be recorded in the **Editran/PX** log that there is no route for that entity.

### Enable connection to internal IPs: ipPermitidas.cfg file

**Editran/PX** validates the IP addresses of the internal servers that connect to the gateway.\
Any of the **Editran** servers entered in the host list are accepted without any additional configuration. However, in certain installations, network elements may require specifying additional IP addresses that must be added as allowed IPs.\
The graphical interface allows these values to be entered, although it is also possible to configure them manually. To do so, edit the file `ipPermitidas.cfg` located in the root directory of the installation of **Editran/PX**, and add a new line with each IP to allow.

```
172.22.167.25
172.22.167.26
```

### Exclude connections from certain IPs from the log: ipnotraza.cfg file

There may be network monitoring tools within an organization (such as HP Openview, Service Monitoring Daemon, LANsurveyor, ipMonitor, ...). These systems periodically try to connect to a service on some network machine to check whether it is still active and accepting connections.\
To prevent the log of **Editran/PX** from being filled with unwanted information, it is possible to exclude the activity of specific TCP/IP addresses.\
The graphical interface allows these values to be entered, but it can also be done manually. To do so, edit the file `ipnotraza.cfg`, located in the root directory of the installation of **Editran/PX** and add a new line with each IP to exclude.\
Below is an example of what the contents of a `ipnotraza.cfg` file containing two IPs (172.22.168.23 and 172.22.168.24) for which you do not want messages to be logged would look like:

```
172.22.168.23
172.22.168.24
```

## Apply configuration changes without restarting Editran/PX

As explained in the installation section, the system **Editran/PX** can be configured to periodically check whether the files `ediproxy.cfg` and `ipPermitidas.cfg` have been modified and apply the new configuration without having to restart the application.\
When it is operating in this mode, there are some aspects to keep in mind:

* The application considers that there is a new configuration if the file modification date is different. To avoid unnecessary updates, it is advisable that when using the graphical configuration tool, you only click the button **Save** when changes have actually been made.
* For the configuration changes to be applied, there must be no active transmissions at that moment. Because of this, there may be a delay between detecting the modification and the moment when the new configuration actually takes effect. The system logs messages both when the configuration modification is detected and when the new configuration is effectively applied:

  * In file `ediproxyserv.log` it is reflected that the file date has changed:

  ```
  26/05/2017 15:54:14.792 Editran/PX configuration file modified.
  ```

  * In file `log.txt` the moment when the changes take effect is recorded:

  ```
  20170526 155614 000000000-000000000-000000 Configuration changes are applied.
  ```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.editran.onesait.com/documentacion-editran/px-5.2.1-en/configuration/configuracion.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
