From 599ebd3c86a88eb551c387badc61db5ad55477ce Mon Sep 17 00:00:00 2001 From: Denys Fedoryshchenko Date: Fri, 7 Jul 2023 08:07:45 +0300 Subject: [PATCH] Edit styling --- GAMING.md | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/GAMING.md b/GAMING.md index e3241b6..fc6a99d 100644 --- a/GAMING.md +++ b/GAMING.md @@ -1,34 +1,45 @@ -## Gaming service +# Gaming service + +## Configure pppoes -### Configure pppoes /etc/api.conf -``` + +```sh apikey=SecretTokenRandom allowip=10.168.100. ``` + allowip must be set to ip of your nat -### Configure radius +## Configure radius + Configure for gaming service radius attribute "Login-LAT-Service" with value "gaming" -### Configure nat +## Configure nat + * Run several instances of pppoe gaming pollers that will retrieve list of gaming users -``` + +```sh gamingclient -u http://pppoeip:apiport/ -k SecretTokenRandom ``` apiport by default 9000, might be different in some cases * Configure ipset for gaming users -``` + +```sh ipset create gamingclients hash:net timeout 120 ``` + Also add relevant rules to nat users to different pool, for example: -``` + +```sh iptables -t nat -A POSTROUTING -m set --match-set gamingclients src -j SNAT --to-source $GAMING --persistent ``` + where $GAMING is ip of your gaming pool (1.2.3.1-1.2.3.10 for example) ### How it works? + * User login and get gaming service attribute from radius * API daemon will detect such user and put in special list available over API HTTP GET request * Gaming poller will retrieve list of users and put them in ipset each X seconds