Edit styling

This commit is contained in:
Denys Fedoryshchenko
2023-07-07 08:07:45 +03:00
parent 73961dd660
commit 599ebd3c86
+19 -8
View File
@@ -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