Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Test installer

on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

jobs:
test:
runs-on: ubuntu-latest
container:
image: debian:12

steps:
- name: Install dependencies
run: |
apt-get update -qq
apt-get install -y --no-install-recommends \
python3 python3-yaml git ca-certificates

- name: Checkout
uses: actions/checkout@v4

- name: Run tests
run: bash tests/test_install.sh

shellcheck:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: ShellCheck install.sh
run: shellcheck install.sh

- name: ShellCheck test_install.sh
run: shellcheck tests/test_install.sh
50 changes: 45 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,55 @@ Created by Travis Kreikemeier @ NETWAR (http://www.netwar.org)

Gamebridge allows you to carve up your LAN party network into many VLANs. Usually, this is a no-no for LAN parties due to the broadcasts needed to find local LAN game servers. Gamebridge rebroadcasts those game server finding beacons across many VLANs without passing anything else (ARP, BPDU, other non-game server broadcasts, etc.).

# INSTALL
* Follow steps in gamebridge_setup.txt

# REQUIREMENTS
* Tested at large LAN events with Debian 12 as a guest on VMWare ESX 8
* Any other distros may require modifications
* Python 3 with PyYAML (`apt-get install python3-yaml`)
* Two NICS: One connected to a single VLAN for management
* The other NIC connected to a trunk port on your switch with all VLANs tagged
* If using VMWare vSwitch, the trunk port group needs to have VLAN 4095 set so that it passes all VLANs tagged to the guest vNIC.

# TODO
* Create installer script to simplify installation
# INSTALL

1. Copy the example config and edit it for your network:
```
cp gamebridge.conf.example.yaml gamebridge.conf.yaml
vi gamebridge.conf.yaml
```

2. Preview what the installer will do:
```
./install.sh -c gamebridge.conf.yaml --dry-run
```

3. Run the installer:
```
sudo ./install.sh -c gamebridge.conf.yaml
```

4. Reboot to apply:
```
sudo reboot
```

5. Verify after reboot:
```
sudo ./install.sh --status
```

# CONFIGURATION

Edit `gamebridge.conf.yaml` to match your environment:

| Field | Description |
|---|---|
| `management.interface` | Management NIC name (e.g. `ens192`) |
| `management.address` | Management IP address |
| `management.netmask` | Management subnet mask |
| `management.gateway` | Management gateway |
| `trunk_interface` | Trunk NIC connected to tagged VLANs (e.g. `ens224`) |
| `bridge` | Bridge interface name (default: `br0`) |
| `vlans` | List of VLAN IDs to bridge |
| `game_ports` | List of UDP port ranges to allow (e.g. `"27014:27025"`) |

See `gamebridge.conf.example.yaml` for a full working example.
105 changes: 105 additions & 0 deletions gamebridge.conf.example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
---
# Gamebridge Configuration
# Copy this file and customize for your network environment.
# Save as .yaml or .yml and pass to install.sh with -c/--config.

# Management interface - for SSH/admin access (not bridged)
management:
interface: ens192
address: 10.10.10.12
netmask: 255.255.255.0
gateway: 10.10.10.1

# Trunk interface - connected to switch port with all VLANs tagged
trunk_interface: ens224

# Bridge interface name
bridge: br0

# VLAN IDs to bridge together
vlans:
- 10
- 11
- 101
- 102
- 103
- 104
- 105
- 106
- 107
- 108
- 109
- 110
- 111
- 112
- 113
- 114
- 115
- 116
- 117
- 118
- 119
- 120
- 121
- 122
- 123
- 124
- 125
- 126
- 127
- 128
- 129
- 130
- 131
- 132
- 133
- 134

# UDP port ranges for game server discovery broadcasts.
# Format: "start:end" for ranges, or "port:port" for single ports.
game_ports:
- "1301:1312"
- "1716:1727"
- "2234:2245"
- "2301:2312"
- "2350:2360"
- "3074:3074"
- "3454:3465"
- "3657:3668"
- "4242:4242"
- "4321:4321"
- "5001:5001"
- "5120:5131"
- "6112:6112"
- "7140:7140"
- "7776:7788"
- "8086:8088"
- "10480:10491"
- "10777:10777"
- "10999:10999"
- "12299:12310"
- "14001:14001"
- "17500:17500"
- "20099:20110"
- "21999:22010"
- "23757:23757"
- "24298:24298"
- "25299:25310"
- "25565:25565"
- "25999:26010"
- "26001:26011"
- "26900:26905"
- "27014:27025"
- "27215:27215"
- "27887:27898"
- "27900:27900"
- "27959:27970"
- "28069:28080"
- "28959:28970"
- "29069:29080"
- "29252:29263"
- "29899:29910"
- "30719:30730"
- "44400:44410"
- "58202:58203"
- "65117:65117"
Loading