Skip to main content
My question was not well asked, so 50% of the answer became useless
Source Link

Your question/your setup is a little confused.

I assume that you have theYou need to modify your iptables rule on your server: It should be for UDP, not for TCP. You want to connect from the internet toAdditionally, your server usinggets the UDP traffic to port 2000. The openvpn server listens on UDP as your router rewrites the destination port 4253.and IP:

  1. You need to get sure your router is correctly configured: You need to redirect external UDP port 2000 to internal UDP port 4253 on your server.

  2. You need also to modify your iptables rule: It should be for UDP, not for TCP. Additionally, your server gets the UDP traffic to port 4253 as your router rewrites the destination port and IP:

     iptables -t filter -A INPUT -p udp --dport 4253 -j ACCEPT
    
    iptables -t filter -A INPUT -p udp --dport 2000 -j ACCEPT

Your question/your setup is a little confused.

I assume that you have the iptables rule on your server. You want to connect from the internet to your server using UDP port 2000. The openvpn server listens on UDP port 4253.

  1. You need to get sure your router is correctly configured: You need to redirect external UDP port 2000 to internal UDP port 4253 on your server.

  2. You need also to modify your iptables rule: It should be for UDP, not for TCP. Additionally, your server gets the UDP traffic to port 4253 as your router rewrites the destination port and IP:

     iptables -t filter -A INPUT -p udp --dport 4253 -j ACCEPT
    

You need to modify your iptables rule: It should be for UDP, not for TCP. Additionally, your server gets the UDP traffic to port 2000 as your router rewrites the destination port and IP:

    iptables -t filter -A INPUT -p udp --dport 2000 -j ACCEPT
Source Link
jofel
  • 27.4k
  • 8
  • 71
  • 97

Your question/your setup is a little confused.

I assume that you have the iptables rule on your server. You want to connect from the internet to your server using UDP port 2000. The openvpn server listens on UDP port 4253.

  1. You need to get sure your router is correctly configured: You need to redirect external UDP port 2000 to internal UDP port 4253 on your server.

  2. You need also to modify your iptables rule: It should be for UDP, not for TCP. Additionally, your server gets the UDP traffic to port 4253 as your router rewrites the destination port and IP:

     iptables -t filter -A INPUT -p udp --dport 4253 -j ACCEPT