From b5ca5b4417de002f274daf30f76655ae76903464 Mon Sep 17 00:00:00 2001 From: serinko <97586125+serinko@users.noreply.github.com> Date: Tue, 24 Oct 2023 09:11:17 +0200 Subject: [PATCH] add exit gateway options --- .../operators/src/nodes/gateway-setup.md | 78 ++++++++++++++++++- .../operators/src/nodes/maintenance.md | 10 +-- 2 files changed, 76 insertions(+), 12 deletions(-) diff --git a/documentation/operators/src/nodes/gateway-setup.md b/documentation/operators/src/nodes/gateway-setup.md index 5a880c4ece..76412d55c4 100644 --- a/documentation/operators/src/nodes/gateway-setup.md +++ b/documentation/operators/src/nodes/gateway-setup.md @@ -9,6 +9,8 @@ ``` +As a result of [Project Smoosh](../faq/smoosh-faq.md), the current version of `nym-gateway` binary also contains `nym-network-requester` function which can be turned on or off byt the operator, to set the gateway as an exit node. More info on these changes [below](). + ## Preliminary steps Make sure you do the preparation listed in the [preliminary steps page](../preliminary-steps.md) before setting up your gateway. @@ -56,22 +58,90 @@ To check available configuration options use: ``` ~~~ -The following command returns a gateway on your current IP with the `id` of `supergateway`: +The following command returns a gateway on your current IP with the `` of `supergateway`: ``` -./nym-gateway init --id supergateway --host $(curl ifconfig.me) --wallet-address n1eufxdlgt0puwrwptgjfqne8pj4nhy2u5ft62uq +./nym-gateway init --id supergateway --host $(curl ifconfig.me) ``` ~~~admonish example collapsible=true title="Console output" ``` - + ``` ~~~ The `$(curl ifconfig.me)` command above returns your IP automatically using an external service. Alternatively, you can enter your IP manually if you wish. If you do this, remember to enter your IP **without** any port information. + +#### Initialising gateway with network requester + +As some of the [Project Smoosh](../faq/smoosh-faq.md) changes getting implemented, the gateways now can work also as a network requesters at the same time. Such combination creates an exit gateway node, needed for new more open setup. + +An operator can initialise the gateway and network requester together by running: + +``` +./nym-gateway init --id --host $(curl ifconfig.me) --with-network-requester +``` + +If we follow the previous example with `` chosen `supergateway`, adding the `--with-network-requester` flag, the outcome will be: + + +~~~admonish example collapsible=true title="Console output" +``` + +``` +~~~ + +You can see that the printed information besides identity and sphinx keys also includes a long string called address. This is the addressto be provided to your local [socks5 client](https://nymtech.net/docs/clients/socks5-client.html) as a `--provider` if you wish to connect to your own exit gateway. + +#### Add network requester to existing gateway + +If you already have a gateway and got it [upgraded](./maintenance.md#upgrading-your-node) to the [newest version](./gateway-setup.md#current-version), you can easily add a network requester by stopping your gateway and running a command `setup-network-requester`. + +See the options: + +``` +./nym-gateway setup-network-requester --help +``` + +~~~admonish example collapsible=true title="Console output" +``` + +``` +~~~ + +Run with `--enabled true` flag (using same placeholders like above): + +``` +./nym-gateway setup-network-requester --enabled true --id supergateway --host $(curl ifconfig.me) +``` + +~~~admonish example collapsible=true title="Console output" +``` + +``` +~~~ + +In case there are any problems, you can also change it manually by editing the gateway config stored in `/home/user/.nym/gateways//config/config.toml` where the line under `[network_requester]` needs to be edited from `false` to `true`, it shall look like this: + +``` +[network_requester] +# Specifies whether network requester service is enabled in this process. +enabled = true +``` + +Save, exit and restart your gateway. + +All information about your network requester connected to your gateway is in `/home/user/.nym/gateways/snus/config/network_requester_config.toml`. + +```admonish info +Before you bond and run your gateway, please make sure the [firewall configuration](./maintenance.md#configure-your-firewall) is setup so your gateway can be reached from the outside. +``` + ### Bonding your gateway + #### Via the Desktop wallet + You can bond your gateway via the Desktop wallet. 1. Open your wallet, and head to the `Bonding` page, then select the node type `Gateway` and input your node details (Location format is , ). Press `Next` @@ -81,7 +151,7 @@ You can bond your gateway via the Desktop wallet. 3. You will be asked to run a the `sign` command with your `gateway` - copy and paste the long signature as the value of `--contract-msg` and run it. ``` -./nym-mixnode sign --id --contract-msg +./nym-gatewway sign --id --contract-msg ``` It will look something like this: diff --git a/documentation/operators/src/nodes/maintenance.md b/documentation/operators/src/nodes/maintenance.md index e29b80eb25..03bb33a0f3 100644 --- a/documentation/operators/src/nodes/maintenance.md +++ b/documentation/operators/src/nodes/maintenance.md @@ -152,14 +152,8 @@ sudo ufw status Finally open your `` p2p port, as well as ports for ssh and ports for verloc and measurement pings: ```sh -# for mix node -sudo ufw allow 1789,1790,8000,22/tcp - -# for gateway -sudo ufw allow 1789,22,9000/tcp - -# for network requester -sudo ufw allow 22,9000/tcp +# for mix node, gateway and network requester +sudo ufw allow 1789,1790,8000,9000,22/tcp # for validator sudo ufw allow 1317,26656,26660,22,80,443/tcp