View Single Post
NomisCZ
AlliedModders Donor
Join Date: Mar 2014
Location: Czech_Republic
Old 01-03-2021 , 12:24   Re: [Linux] Source Query Proxy: DDoS Protection - Kernel redirection!
Reply With Quote #83

Hello,

I have a problem with:
PHP Code:
[INFO] [MyLittleServerBacking off _update_info(...) for 0.3s (asyncio.exceptions.TimeoutError)
[
INFO] [MyLittleServerBacking off _update_players(...) for 0.6s (asyncio.exceptions.TimeoutError)
[
INFO] [MyLittleServerBacking off _update_rules(...) for 0.4s (asyncio.exceptions.TimeoutError
https://imgur.com/a/SKz6Fys

I tried it on Ubuntu 20.04.x (VM / Dedicated) / Docker and I got same results.

Kernel: Linux meta-dev 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04

Firewall: disabled

eBPF works (only for testing): python3 redirect.py -p 27015:27915 / python2 redirect.py -p 27015:27815

CS:GO startup:

./srcds_run -game csgo -console -usercon +exec server.cfg -autoupdate -strictportbind -norestart -nobreakpad -debug +sv_pure 0 -port 27015 +ip <PUBLIC_IP> +net_public_adr <PUBLIC_IP> +map de_dust2 -tickrate 128 -maxplayers_override 19 +game_mode 0 +game_type 0 +mapgroup mg_active +sv_setsteamaccount XXXXXXXXXXXX -gamemodes_serverfile gamemodes_server.txt


Configs:

00-globals.yaml:
PHP Code:
# Defaults for each server in `servers` section
# Any of these `values` can be overridden locally:
# in local `defaults` section
# in `servers` section
defaults:
  
# True - defaults will be applied for each NEXT config file in conf.d directory
  # False - applied only for current file
  # conf.d/ files read sequentially by alphabetical order
  # we recommend start config names with sequential value: 00-globals.yaml, 01-game1.yaml, 02-game2.yaml
  
global: True
  values
:
    
network:
      
# Real game server IP address
      
server_ip'<PUBLIC_IP>'
      
# IP address for listening incoming queries
      
bind_ip'0.0.0.0'
      
# Real game server PORT (respect to server_ip)
      
server_port0  # don't set in globals, only for doc here
      # PORT for listening incoming queries (respect to bind_ip)
      
bind_port0  # don't set in globals, only for doc here
      # False (default) - queries from `server_port` will be redirected to `bind_port`
      # only for auto-ebpf handling, for more info see `ebpf` section below
      # True - disable redirection (useful for just proxying and debug purposes)
      
ebpf_no_redirectfalse
    
# How often update A2S_INFO data
    
a2s_info_cache_lifetime5
    
# How often update A2S_RULES data
    
a2s_rules_cache_lifetime5
    
# How often update A2S_PLAYERS data
    
a2s_players_cache_lifetime1
    
# How often change src port for queries to Real Game Server
    # Some games required that due integrated ddos protection
    # Without it sqporxy ip:port will be "banned" for queries
    
src_query_port_lifetime10

    
# False (default) - no action, A2S_RULES will work
    # True - don't update A2S_RULES cache
    # This will be helpful for HLDS servers which protocol is different
    # But be careful, you also need disable redirection for A2S_RULES packets
    # see the IS_QUERY_REQUEST_PACKET in https://github.com/spumer/source-query-proxy-kernel-module/blob/master/src-ebpf/utils.h
    # CS:GO also has broken A2S_RULES, but fix available at https://forums.alliedmods.net/showthread.php?t=236521
    
no_a2s_rulesfalse


# See 01-dummy-game.yaml
servers:


# Automatically run eBPF redirection
ebpf:
  
# Download any release of SQProxy Kernel Module
  # And add path to `redirect.py`
  # https://github.com/spumer/source-query-proxy-kernel-module/releases
  # If you want run it without root privileges, see: https://github.com/spumer/source-query-proxy-kernel-module/tree/master/src-ebpf#non-root-ru>
  # and make sure executable prepended with 'sudo':
  #   executable:
  #     - 'sudo'
  #     - 'python2'
  
enabledTrue
  executable
'python2'
  
script_path'/etc/sqproxy/conf.d/src-ebpf/redirect.py'
  
#script_path: './src-ebpf/redirect.py' 
01-dummy-game.yaml
PHP Code:
servers:
  
MyLittleServer:
    
network:
      
server_port27015
      bind_port
27815 
__________________

Last edited by NomisCZ; 01-03-2021 at 12:38.
NomisCZ is offline