0

VPS in installed Ubuntu server 20.04 and OpenVPN, I need to forward all the traffic from a specific port of the vps public ip, to the same port of a VPN client.

My Ubuntu VPS ip is 107.172.142.153 And I want to use this port 8888

root@himuami:~# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 107.172.142.153  netmask 255.255.255.0  broadcast 107.172.142.255
        inet6 fe80::216:3cff:fe7f:6a1c  prefixlen 64  scopeid 0x20<link>
        ether 00:16:3c:7f:6a:1c  txqueuelen 1000  (Ethernet)
        RX packets 18348960  bytes 4334658733 (4.3 GB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 17026930  bytes 4369649692 (4.3 GB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 64  bytes 6523 (6.5 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 64  bytes 6523 (6.5 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

 0
vidarlo
  • 6,654
  • 2
  • 18
  • 31
  • 1
    Does this answer your question? [How can I port forward with iptables?](https://serverfault.com/questions/140622/how-can-i-port-forward-with-iptables) – vidarlo May 16 '23 at 05:58

0 Answers0