2019-12-06 15:26:03 +00:00
# Static Ports
2019-12-04 15:39:41 +00:00
2020-07-11 08:55:13 +00:00
Depending on how your network is set up, you may need to set a static port to successfully connect to peers to perform storage deals with your **Lotus Miner** .
2019-12-04 15:39:41 +00:00
## Setup
2020-07-08 10:53:04 +00:00
To change the random **swarm port** , you may edit the `config.toml` file located under `$LOTUS_MINER_PATH` . The default location of this file is `$HOME/.lotusminer` .
2019-12-04 15:39:41 +00:00
2019-12-06 15:26:03 +00:00
To change the port to `1347` :
2019-12-04 15:39:41 +00:00
```sh
[Libp2p]
ListenAddresses = ["/ip4/0.0.0.0/tcp/1347", "/ip6/::/tcp/1347"]
```
2019-12-06 15:26:03 +00:00
After changing the port value, restart your **daemon** .
2019-12-04 15:39:41 +00:00
2020-06-09 00:03:11 +00:00
## Announce Addresses
If the **swarm port** is port-forwarded from another address, it is possible to control what addresses
are announced to the network.
```sh
[Libp2p]
AnnounceAddresses = ["/ip4/< public-ip > /tcp/1347"]
```
If non-empty, this array specifies the swarm addresses to announce to the network. If empty, the daemon will announce inferred swarm addresses.
Similarly, it is possible to set `NoAnnounceAddresses` with an array of addresses to not announce to the network.
2019-12-04 17:53:36 +00:00
## Ubuntu's Uncomplicated Firewall
2019-12-06 15:26:03 +00:00
Open firewall manually:
2019-12-04 15:39:41 +00:00
```sh
2019-12-06 15:26:03 +00:00
ufw allow 1347/tcp
2019-12-04 15:39:41 +00:00
```
2019-12-18 21:46:09 +00:00
Or open and modify the profile located at `/etc/ufw/applications.d/lotus-daemon` :
2019-12-04 15:39:41 +00:00
```sh
[Lotus Daemon]
title=Lotus Daemon
description=Lotus Daemon firewall rules
ports=1347/tcp
```
2019-12-06 15:26:03 +00:00
Then run these commands:
2019-12-04 15:39:41 +00:00
```sh
2019-12-06 15:26:03 +00:00
ufw update lotus-daemon
ufw allow lotus-daemon
2019-12-18 18:40:47 +00:00
```