Help test incoming udp issue on specific tierhive SG node

mhubudmhubud OG
edited October 31 in Help

Hi folks, I've been trying to troubleshoot issues with incoming udp (wireguard) on one sg node (51.79.162.49). If anyone else has a moment to build a vm on this node and perform these tests, I would appreciate it.

I'm not sure if it's me (apologies in advance if so) or if it's related to the this node being unique from others (it has advanced ddos according to ant). And yes, we've been corresponding about it.
I have tested the exact same setup (which isn't much, just wg on new deb13 vps) on other Tierhive nodes and it works fine. The issue is specific to this node/network. That said, Ant says there are hundreds of instances on this node so it would be surprising if no one else has witnessed this behavior (since others must also be using for wg right?). I agree, but I've been able to consistently reproduce the issue many times. So that's why I asking for a couple people to test. ;)

What I describe below ONLY happens on new instances built on SG node 51.79.162.49 (which essentially is the default node for new instances in SG). This behavior does not exist on other nodes in SG nor 3 other Tierhive locations I tested. Also if the vps is created on 51.79.162.49 and the inbound udp issue exists but then the vps is moved to a different node in SG, then it works fine.

Basically with my testing, even with a fresh vps with nothing installed/configured other than wireguard, new inbound UDP packets never arrive to the vps from a client ip that hasn't already communicated with 51.79.162.49. So if you setup a wg server here, it will only work if you perform some out-of-band connection between 51.79.162.49 and the client ip. Once any kind of non-udp communication happens between them, then wireguard/udp starts flowing.

Here is what I do and would like someone else to do/test:

  • Create new instance in SG (verify after that it's on 51.79.162.49)

    Debian13, default ram/disk, all low performance settings

  • Install/setup wireguard (I'm using angristan script)

  • Create at least 2 client configs
  • Setup the port forward in web panel
  • Change the wg client configs to use forwarded port
  • Test wgclient1 just to make sure wg is working. For initial test, this must be done from the SAME internet IP that you used to ssh into this testvps.
  • Disconnect wgclient1 from wg and reconnect to testvps via ssh (from same IP).
  • Fire up tcpdump -n udp.

Now what we're going to do is test wg connection from a client using an internet IP that is NOT coming from the same internet IP that you connected to your testvps via ssh.

  • It is very important that there have not been ANY communications between 51.79.162.49 and this client/IP recently (I'm not sure the duration yet).
  • Copy wgclient2 config to client device 2 on a different network (or how ever you want as long as this device will connect via wg from a different internet IP than client 1. Again, you must not communicate between 51.79.162.49 and client2 device yet.
  • Now Connect to wg from wgclient2/device 2/separate internet ip.
  • Viewing your already running ssh/tcpdump session on testvps, note whether or not the udp traffic is appearing. In my case, there is no inbound udp traffic. Let it run a bit if you want.

Assuming the wg udp packets are not arriving (keep tcpdump running/watching on testvps ssh session from device1), then perform one of these tests:

  • ping or tcp connect from the testvps on 51.79.162.49 to the internet ip of client2.
  • tcp connect (not ping) from a different device on same network as client2 to 51.79.162.49.

Upon non-wg/udp traffic initiation, then wg traffic between client2<>51.79.162.49 will start flowing.

To retest, it does not matter if you restart wg on vps or restart the vps, the inbound udp traffic will continue to work for a while. Eventually however, when there has been no communications between 51.79.162.49 and client2 for a while, then if you retest the same thing will happen (inbound udp connections to vps won't reach vps unless an out of band connection happens).

I have tested this from 5 different client devices (mac, pi, vps) on numerous ip networks in different locations. I have built and tested 3 new vps instances on 51.79.162.49 with the same results.

But I'm curious what others find. Thanks!

PS (only if using another vps as a wg client test):
Don't forget if you test wgclient2 from another vps, you need to add rules in ur wgclient config on that client vps so you don't lose ssh access once you up the wg client. Several of my tests were on non-vps devices, so not necessary.

Comments

  • Maybe you should try using Codex or Claude?

  • natboxionatboxio Provider

    Great

  • AnthonySmithAnthonySmith AdministratorProviderOG

    Ok cool, happy for testing to be outsourced :)

    Just as a little bit of extra information, for any OVH experts, the unique thing about this server is the OVH game ddos protection.

    I say unique, but that's on in Australia too but apparently it doesn't have the same impact there.

    TierHive - Hourly VPS - NAT Native - /24 per customer - DE, UK, SG, CA x2, USA x5, FR x3, AU, PL, NL, JP, BR, ZA
    FREE tokens on sign up, try before you buy. | Static Hosting Free for life: https://tierhive.com/static-hosting/

  • xxxxxx
    edited November 8

    client 1

    /tmp/wg # cat /etc/wireguard/wgtest.conf
    [Interface]
    PrivateKey = 0DnUBLUYMXt0QP6aL9mqH/h8RTm6B2k7Wt/qluLxVlU=
    Address = 10.66.66.2/32
    # DNS = 1.1.1.1,1.0.0.1
    
    # Uncomment the next line to set a custom MTU
    # This might impact performance, so use it only if you know what you are doing
    # See https://github.com/nitred/nr-wg-mtu-finder to find your optimal MTU
    # MTU = 1420
    
    [Peer]
    PublicKey = 3m4lQiTw+/VZYNK1lFtk8Am+RhhR74L47JNzGZHGbiE=
    PresharedKey = NQ7Rm6xw4YLiXKN1TZIgs8o/7r+J0PoYaxq0ItxkFeI=
    Endpoint = 51.79.162.49:6744
    AllowedIPs = 10.66.66.1/32
    
    /tmp/wg # wg-quick up wgtest
    [#] ip link add dev wgtest type wireguard
    [#] wg addconf wgtest /dev/fd/63
    [#] ip -4 address add 10.66.66.2/32 dev wgtest
    [#] ip link set mtu 1420 up dev wgtest
    [#] ip -4 route add 10.66.66.1/32 dev wgtest
    /tmp/wg #
    /tmp/wg #
    /tmp/wg # wg show
    interface: wgtest
      public key: oHGulrWxgBozO0M0Wd2elaGtSDcUbZFScQGMjf/X1j8=
      private key: (hidden)
      listening port: 59844
    
    peer: 3m4lQiTw+/VZYNK1lFtk8Am+RhhR74L47JNzGZHGbiE=
      preshared key: (hidden)
      endpoint: 51.79.162.49:6744
      allowed ips: 10.66.66.1/32
    /tmp/wg # ping -c 4 10.66.66.1
    PING 10.66.66.1 (10.66.66.1): 56 data bytes
    64 bytes from 10.66.66.1: seq=0 ttl=64 time=357.423 ms
    64 bytes from 10.66.66.1: seq=1 ttl=64 time=169.818 ms
    64 bytes from 10.66.66.1: seq=2 ttl=64 time=169.496 ms
    64 bytes from 10.66.66.1: seq=3 ttl=64 time=169.764 ms
    
    --- 10.66.66.1 ping statistics ---
    4 packets transmitted, 4 packets received, 0% packet loss
    round-trip min/avg/max = 169.496/216.625/357.423 ms
    

    client 2

    root@instabox-test:/etc/wireguard# wg-quick up wgtest
    ping -c 4 10.66.66.1
    wg show
    [#] ip link add wgtest type wireguard
    Error: Unknown device type.
    [!] Missing WireGuard kernel module. Falling back to slow userspace implementation.
    [#] wireguard-go wgtest
    ┌──────────────────────────────────────────────────────┐
    │                                                      │
    │   Running wireguard-go is not required because this  │
    │   kernel has first class support for WireGuard. For  │
    │   information on installing the kernel module,       │
    │   please visit:                                      │
    │         https://www.wireguard.com/install/           │
    │                                                      │
    └──────────────────────────────────────────────────────┘
    [#] wg setconf wgtest /dev/fd/63
    [#] ip -4 address add 10.66.66.3/32 dev wgtest
    [#] ip link set mtu 1420 up dev wgtest
    [#] ip -4 route add 10.66.66.1/32 dev wgtest
    PING 10.66.66.1 (10.66.66.1) 56(84) bytes of data.
    
    --- 10.66.66.1 ping statistics ---
    4 packets transmitted, 0 received, 100% packet loss, time 3049ms
    
    interface: wgtest
      public key: 0oaSBool7DL0SJ0adpsa28bMQISri3IwtVnFdYBfGWA=
      private key: (hidden)
      listening port: 50081
    
    peer: 3m4lQiTw+/VZYNK1lFtk8Am+RhhR74L47JNzGZHGbiE=
      preshared key: (hidden)
      endpoint: 51.79.162.49:6744
      allowed ips: 10.66.66.1/32
      transfer: 0 B received, 444 B sent
    






  • The servers used for the above tests were temporarily created and have already been deleted.

  • @xxx said:
    The servers used for the above tests were temporarily created and have already been deleted.

    Thanks for testing!! Let me know if you want a 0.5 token of appreciation.

  • @mhubud said:

    @xxx said:
    The servers used for the above tests were temporarily created and have already been deleted.

    Thanks for testing!! Let me know if you want a 0.5 token of appreciation.

    No need, thanks!

  • I've managed to replicate your problem. Essentially, connections to WG from a "new" ip address fails, until a ssh connection(probably any valid TCP connection) is made. Setup with TierHive WG XXS recipe Alpine 3.24.1 (128MB/1GB/LLL), and tested connection from mobile using Wifi(IP not new to SG node) and 4G(IP new to SG node). Some screenshots below:

    Connection to WG from a "known" IP (via Wifi):
    LowEndSpirit - VPS Hosting and tech forum
    LowEndSpirit - VPS Hosting and tech forum

    Connection to WG from a "unknown" IP (via 4G data):
    LowEndSpirit - VPS Hosting and tech forum

    Attempting to ping the VPS just to see if it makes a difference:
    LowEndSpirit - VPS Hosting and tech forum
    LowEndSpirit - VPS Hosting and tech forum

    Attempting to ssh into the VPS:
    LowEndSpirit - VPS Hosting and tech forum

    4G connection now works:
    LowEndSpirit - VPS Hosting and tech forum

    VPS has been deleted.

  • @AnthonySmith said:
    Ok cool, happy for testing to be outsourced :)

    Just as a little bit of extra information, for any OVH experts, the unique thing about this server is the OVH game ddos protection.

    I say unique, but that's on in Australia too but apparently it doesn't have the same impact there.

    I'm wondering if this is DDOS protection in place on the OVH infra. May not be a good idea to turn it off, but it it will stop completely new Wireguard clients. As a workaround, even a failed ssh login (still a valid TCP connection) will allow the IP to pass UDP though.

  • xxxxxx
    edited November 8

    Like this?

    https://reddit.com/r/ovh/comments/y0fe89/comment/itxl96s/

    Mine was I had to make a tcp connection ... before I was allowed to connect to my game server (UDP).
    

    What both cases have in common is that some communication over another protocol has to happen before UDP traffic can get through.

  • @TemporiousOne said:

    @AnthonySmith said:
    Ok cool, happy for testing to be outsourced :)

    Just as a little bit of extra information, for any OVH experts, the unique thing about this server is the OVH game ddos protection.

    I say unique, but that's on in Australia too but apparently it doesn't have the same impact there.

    I'm wondering if this is DDOS protection in place on the OVH infra. May not be a good idea to turn it off, but it it will stop completely new Wireguard clients. As a workaround, even a failed ssh login (still a valid TCP connection) will allow the IP to pass UDP though.

    Agreed. It's just annoying (less so if on laptop, more so if on mobile). What I suggested is that new vps instances created on this node be presented a notice that inbound UDP traffic (wireguard, etc) doesn't work without extra steps/comms (as discussed).

  • AnthonySmithAnthonySmith AdministratorProviderOG

    Thanks for the extra details, sorry I lost track of the thread.

    Odd that it doesn't impact Australia in the same way but such is life.

    I will continue investigating.

    Ant.

    TierHive - Hourly VPS - NAT Native - /24 per customer - DE, UK, SG, CA x2, USA x5, FR x3, AU, PL, NL, JP, BR, ZA
    FREE tokens on sign up, try before you buy. | Static Hosting Free for life: https://tierhive.com/static-hosting/

Sign In or Register to comment.