this repo has no description

docs: update format of readme

dunkirk.sh 0580cf7c eb889560

verified
+21 -45
00-mini-hack-overview.md
···
```
External Network (172.20.0.0/16)
-
├── Kali External: 172.20.2
+
├── Kali External: 172.20.0.2
├── Router External: 172.20.<team>.1
-
└── Scoring Server: 172.20.1
+
└── Scoring Server: 172.20.0.1
Internal Network (192.168.<team>.0/24)
├── Router Internal: 192.168.<team>.1
···
### 1. Find Your Team Number
**On Kali External**:
-
```bash
-
ip addr show # Look for 172.20.X
-
# If you see 172.20.2, your team number is 2
-
# Check scoreboard at http://172.20.1 for confirmation
-
```
+
+
Check scoreboard at http://172.20.1 for team number (username: `sandbox` pass: `password`).
### 2. Configure Router
**Login to MikroTik** (via ProxMox console or SSH):
+
```bash
# Default login
admin
···
```
**Assign IP addresses**:
+
```bash
+
/interface print
+
# External interface
-
/ip address add address=172.20.<team>.1/16 interface=ether3
+
/ip address add address=172.20.<team>.1/16 interface=ether#
# Internal interface
-
/ip address add address=192.168.<team>.1/24 interface=ether4
+
/ip address add address=192.168.<team>.1/24 interface=ether#
# Verify
/ip address print
```
-
**Or use Web GUI**: `http://172.20.<team>.1:8080`
-
- Login: `admin` / `<your password>`
-
- Go to **Quick Set**
-
- Enter external IP: `172.20.<team>.1/16`
-
- Enter internal IP: `192.168.<team>.1/24`
-
- ✅ **Check "Enable NAT"** (required!)
-
- Click **Apply Configuration**
+
The webgui can't be used here because there are no ip addresses assigned to it yet.
### 3. Configure Ubuntu Web Server
**Assign static IP**:
+
```bash
sudo nano /etc/netplan/01-network-manager-all.yaml
```
···
ping 192.168.<team>.1 # Test router connectivity
```
+
or open settings -> enable wired and config there
+
**Start Apache**:
+
```bash
sudo systemctl restart apache2
sudo systemctl status apache2 # Should show "active (running)"
```
-
**Test locally**:
```bash
-
curl http://192.168.<team>.2 # Should return HTML
+
sudo vi /var/www/html/index.html # change team number
```
### 4. Configure Port Forwarding (Router)
-
**Web GUI Method** (recommended):
+
**Web GUI**:
+
```
http://172.20.<team>.1:8080
```
-
1. Go to **Quick Set** → **Port Mapping**
+
1. Go to **Quick Set** → **Port Mapping** (enable nat here and change gateway to `172.20.1.1`)
2. Click **New**
- Name: `www-tcp`
- Protocol: `TCP`
···
### 5. Test From External Network
**On Kali External**:
+
```bash
ping 172.20.<team>.1 # Router should respond
curl http://172.20.<team>.1 # Should show web content from internal server
···
All lights should be green!
-
## Quick Troubleshooting
-
-
| Problem | Check |
-
|---------|-------|
-
| Router not pingable | Verify IP on ether3: `/ip address print` |
-
| Web not accessible | 1. Is Apache running? 2. Did you enable NAT? 3. Port forwarding rules exist? |
-
| Internal server can't reach router | Check internal IP on ether4, verify gateway in netplan |
-
| Lights still red | Wait 30 seconds for scoring refresh, check exact IPs match topology |
-
## Configuration Files Reference
**Router**: Web GUI at `http://172.20.<team>.1:8080` or CLI via console
**Ubuntu Web Server**:
+
- Network: `/etc/netplan/01-network-manager-all.yaml`
- Apache: `sudo systemctl restart apache2`
- Website content: `/var/www/html/`
**Kali Machines**: For testing only, no configuration needed
-
-
## Common Mistakes
-
-
❌ Forgot to enable NAT on router
-
❌ Port forwarding only has TCP rule (need UDP too)
-
❌ Wrong team number in IP addresses
-
❌ Apache not started on Ubuntu
-
❌ Netplan syntax error (YAML is whitespace-sensitive)
-
❌ Router interface names wrong (check with `interface print`)
-
-
## Time-Saving Tips
-
-
1. Use **web GUI for router** - faster than CLI for NAT/port forwarding
-
2. Copy/paste team number once you know it - avoid typos
-
3. Test each step before moving on (ping, curl, status checks)
-
4. If stuck, verify each light's requirement on scoreboard
+72 -31
README.md
···
-
# Linux Service Configuration Writeups
+
# NCAE Linux Competition Tools
+
+
> [!CAUTION]
+
> These writeups are tailored for NCAE cybersecurity competitions and may not reflect production best practices.
+
>
+
> Focus is on speed and competition scenarios, not enterprise deployment.
Quick reference guides for configuring services in Linux competitions. Assumes basic Linux knowledge (filesystem navigation, systemctl, ssh, etc.).
-
## Writeups
+
## The Layout
-
0. **[Mini-Hack Quick Start](00-mini-hack-overview.md)** - Complete mini-hack walkthrough checklist
-
1. **[Services Overview](01-services-overview.md)** - General approach to any service
-
2. **[Apache Web Service](02-apache-web-service.md)** - HTTP/HTTPS server configuration
-
3. **[SSH Service](03-ssh-service.md)** - Remote access, keys, security
-
4. **[Network Configuration](04-network-configuration.md)** - Static IPs across different distros
-
5. **[DNS, Rsync, Cron](05-dns-rsync-cron.md)** - Name resolution and automated backups
-
6. **[UFW Firewall](06-ufw-firewall.md)** - Ubuntu firewall configuration
-
7. **[Active Connection Defense](07-active-connection-defense.md)** - Monitor and kill malicious connections
-
8. **[MikroTik Router](08-mikrotik-router.md)** - Router configuration (2025 competition)
+
```bash
+
~/ncae-tools
+
├── 00-mini-hack-overview.md # Complete mini-hack walkthrough checklist
+
├── 01-services-overview.md # General approach to any service
+
├── 02-apache-web-service.md # HTTP/HTTPS server configuration
+
├── 03-ssh-service.md # Remote access, keys, security
+
├── 04-network-configuration.md # Static IPs across different distros
+
├── 05-dns-rsync-cron.md # Name resolution and automated backups
+
├── 06-ufw-firewall.md # Ubuntu firewall configuration
+
├── 07-active-connection-defense.md # Monitor and kill malicious connections
+
└── 08-mikrotik-router.md # Router configuration (2025 minitik)
+
```
## Service-Specific Quick Reference
### Apache Service Names
+
```bash
apache2 # Ubuntu/Debian/Kali
httpd # CentOS/RHEL
···
### Network Configuration Files
-
| Distribution | Config Location |
-
|--------------|----------------|
-
| Kali/Debian | `/etc/network/interfaces` |
-
| Ubuntu | `/etc/netplan/*.yaml` |
+
| Distribution | Config Location |
+
| ------------ | ---------------------------------------- |
+
| Kali/Debian | `/etc/network/interfaces` |
+
| Ubuntu | `/etc/netplan/*.yaml` |
| CentOS/RHEL | `/etc/sysconfig/network-scripts/ifcfg-*` |
### SSH Key Permissions
+
```bash
chmod 700 ~/.ssh/
chmod 600 ~/.ssh/id_rsa # Private key
···
```
Regenerate host keys on cloned VMs:
+
```bash
sudo ssh-keygen -A
sudo systemctl restart sshd
```
### UFW Firewall
+
```bash
sudo ufw enable
sudo ufw allow ssh
···
```
### Active Connection Monitoring
+
```bash
sudo netstat -tunap # All connections with PIDs
sudo netstat -tunap | grep ESTABLISHED # Only active
···
```
### MikroTik Router
+
**CLI**:
+
```bash
/ip address print
/ip address add address=192.168.1.1/24 interface=ether3
···
Default login: `admin` / (blank password)
### Rsync + Cron
+
**Rsync common patterns**:
+
```bash
rsync -av source/ dest/ # Basic sync
rsync -av --delete source/ dest/ # Mirror (delete extra files in dest)
···
```
**Cron syntax**: `minute hour day month weekday command`
+
```
0 2 * * * /path/to/backup.sh # Daily at 2 AM
*/15 * * * * /path/to/script.sh # Every 15 minutes
···
## Distribution Differences
-
| Feature | Ubuntu | Kali | CentOS/RHEL |
-
|---------|--------|------|-------------|
-
| Apache service | `apache2` | `apache2` | `httpd` |
-
| Network config | netplan YAML | interfaces | ifcfg-* scripts |
-
| Firewall | UFW | iptables | firewall-cmd |
-
| Cron service | `cron` | `cron` | `crond` |
+
| Feature | Ubuntu | Kali | CentOS/RHEL |
+
| -------------- | ------------ | ---------- | ---------------- |
+
| Apache service | `apache2` | `apache2` | `httpd` |
+
| Network config | netplan YAML | interfaces | ifcfg-\* scripts |
+
| Firewall | UFW | iptables | firewall-cmd |
+
| Cron service | `cron` | `cron` | `crond` |
**Router (2025)**: All distributions use MikroTik (replaces CentOS router)
···
## Critical Configuration Locations
-
| Service | Config File(s) |
-
|---------|---------------|
-
| SSH | `/etc/ssh/sshd_config` |
-
| Apache (Ubuntu) | `/etc/apache2/apache2.conf`, `/etc/apache2/sites-available/` |
-
| Apache (CentOS) | `/etc/httpd/conf/httpd.conf`, `/etc/httpd/conf.d/` |
-
| Network (Kali) | `/etc/network/interfaces` |
-
| Network (Ubuntu) | `/etc/netplan/*.yaml` |
-
| Network (CentOS) | `/etc/sysconfig/network-scripts/ifcfg-*` |
-
| DNS resolution | `/etc/resolv.conf` |
-
| Cron jobs | `crontab -e` (per-user), `/etc/crontab` (system-wide) |
+
| Service | Config File(s) |
+
| ---------------- | ------------------------------------------------------------ |
+
| SSH | `/etc/ssh/sshd_config` |
+
| Apache (Ubuntu) | `/etc/apache2/apache2.conf`, `/etc/apache2/sites-available/` |
+
| Apache (CentOS) | `/etc/httpd/conf/httpd.conf`, `/etc/httpd/conf.d/` |
+
| Network (Kali) | `/etc/network/interfaces` |
+
| Network (Ubuntu) | `/etc/netplan/*.yaml` |
+
| Network (CentOS) | `/etc/sysconfig/network-scripts/ifcfg-*` |
+
| DNS resolution | `/etc/resolv.conf` |
+
| Cron jobs | `crontab -e` (per-user), `/etc/crontab` (system-wide) |
+
+
## Credits
+
+
These writeups are based on real NCAE competition experience and consolidate knowledge from:
+
+
- NCAE Cyber Games competition materials
+
- Various Linux distribution documentation
+
- Hands-on competition debugging and troubleshooting
+
+
> [!NOTE]
+
> The main repository is hosted on [tangled.org](https://tangled.org/dunkirk.sh/ncae-tools), with GitHub serving as a mirror.
+
+
<p align="center">
+
<img src="https://raw.githubusercontent.com/taciturnaxolotl/carriage/master/.github/images/line-break.svg" />
+
</p>
+
+
<p align="center">
+
&copy 2025-present <a href="https://github.com/taciturnaxolotl">Kieran Klukas</a>
+
</p>
+
+
<p align="center">
+
<a href="https://github.com/taciturnaxolotl/ncae-tools/blob/main/LICENSE.md"><img src="https://img.shields.io/static/v1.svg?style=for-the-badge&label=License&message=MIT&logoColor=d9e0ee&colorA=363a4f&colorB=b7bdf8"/></a>
+
</p>