---
title: "ezgh lb listeners update"
description: "Change a listener."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ezgh lb listeners update

{/* Generated by ezgh-cli's internal/tools/clidocs from the ezgh command tree. Don't edit: change the command's help in ezgh-cli and regenerate. */}

```sh
ezgh lb listeners update <load-balancer> <listener> [--port p] [--target-group <tgp_…>] [--certificate <crt_…>] [--allowed-source-cidr c…] [--idle-timeout s] [flags]
```

Change a listener. Only what's given changes, and `--allowed-source-cidr` replaces the whole list. Open connections carry on where they are. `--protocol` changes within a layer, tcp and tls or http and https; to tls or https it needs a certificate. `--rules-file` replaces an http listener's rules.

Part of [`ezgh lb listeners`](/cli/reference/lb-listeners).

## Flags

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--additional-certificate` | string, repeatable |  | another certificate (crt\_…) for a tls or https listener, served to clients asking by SNI for a name it covers; repeat for more, at most 24, replacing the list |
| `--allowed-source-cidr` | string, repeatable |  | an IPv4 or IPv6 CIDR that may connect; repeat for more, at most 20 |
| `--certificate` | string |  | a tls or https listener's certificate (crt\_…) |
| `--fixed-response` | int |  | an http listener's default action: answer with this status code, 200 to 599 |
| `--forward` | string, repeatable |  | an http listener's default action: forward to a target group (tgp\_…); repeat with weights, tgp\_…=90, to split |
| `--idle-timeout` | int |  | seconds a connection may sit idle: tcp and tls 60 to 6000 |
| `--no-additional-certificates` | boolean |  | remove a tls or https listener's additional certificates |
| `--port` | int |  | the port it listens on, 1 to 65535 |
| `--protocol` | string |  | its new protocol, within its layer: tcp or tls, http or https |
| `--redirect-https` | boolean |  | an http listener's default action: redirect to HTTPS on port 443, keeping the host, path and query (301) |
| `--rules-file` | string |  | an http listener's rules, in order: rules as JSON (a list, or a listener with rules), - for stdin |
| `--target-group` | string |  | where it sends connections (tgp\_…) |

This command also takes the [global flags](/cli/reference#global-flags).

Source: https://docs.ezghcloud.com/cli/reference/lb-listeners-update/index.mdx
