Eu tenho um VPS executando um servidor openVPN, como posso ter clientes na rede VPN enviando solicitações para o IP do host através da rede VPN, ser mapeado para as portas host localhost?
Um exemplo claro, usando as informações abaixo em ip's: Eu quero que um pedido para 172.19.0.1:555 seja o mesmo que um pedido localhost: 555 ao escrever no terminal no Digital Ocean VPS?
Configuração de rede:
Internet --- Digital Ocean VPS (o "host" --- Docker Container VPN (VPN ip: 172.19.0.1) --- Cliente (192.168.0.1)
ip addr ls (o final # 4, br-b1283ee313d0, é a interface de rede openVPN):
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether xxx brd xxx
inet xxx/19 brd xxx scope global eth0
valid_lft forever preferred_lft forever
inet xxx/16 brd xxx scope global eth0:2
valid_lft forever preferred_lft forever
inet6 xxx scope link
valid_lft forever preferred_lft forever
3: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether xxx brd xxx
inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
valid_lft forever preferred_lft forever
inet6 xxx scope link
valid_lft forever preferred_lft forever
4: br-b1283ee313d0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
link/ether xxx brd xxx
inet 172.19.0.1/24 brd 172.19.0.255 scope global br-b1283ee313d0
valid_lft forever preferred_lft forever
inet6 xxx scope link
valid_lft forever preferred_lft forever