infra-nimbus/ansible/roles/redirect-ports
Jakub Sokołowski 5f06c39644
nimbus.mainnet: add two public Beacon API endpoints
These nodes are intended for testing by Community.
https://ethereum.github.io/beacon-APIs/

https://github.com/status-im/infra-nimbus/issues/66

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-10-04 13:42:33 +02:00
..
defaults nimbus.mainnet: add two public Beacon API endpoints 2021-10-04 13:42:33 +02:00
handlers nimbus.mainnet: add two public Beacon API endpoints 2021-10-04 13:42:33 +02:00
tasks nimbus.mainnet: add two public Beacon API endpoints 2021-10-04 13:42:33 +02:00
README.md nimbus.mainnet: add two public Beacon API endpoints 2021-10-04 13:42:33 +02:00

README.md

Description

This role configures port redirects using iptables.

Configuration

You can redirect multiple ports:

redirect_ports:
  - { src:  80, dst: 8080, comment: 'XYZ Service HTTP' }
  - { src: 443, dst: 8443, comment: 'XYZ Service HTTPS' }

All configured ports are opened in the SERVICES chain and redirected using PREROUTING chain in the nat table:

 > sudo iptables -L PREROUTING -t nat   
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination         
REDIRECT   tcp  --  anywhere             anywhere             tcp dpt:http  /* XYZ Service HTTP */ redir ports 8080
REDIRECT   tcp  --  anywhere             anywhere             tcp dpt:https /* XYZ Service HTTPS */ redir ports 8443