DragonFlyBSD Kernel Audit
DF-0740 / setup.sh
← back to finding ↓ download raw
#!/bin/sh
# DF-0740 GRE tunnel setup — simulates an admin configuring a GRE tunnel.
# This is the precondition: the victim has a GRE tunnel configured.
# Run as root.
set -e

echo "[*] Creating GRE tunnel gre0..."
ifconfig gre0 destroy 2>/dev/null || true
ifconfig gre create

echo "[*] Setting tunnel endpoints: 127.0.0.1 --> 127.0.0.2"
ifconfig gre0 tunnel 127.0.0.1 127.0.0.2

echo "[*] Assigning inner address and bringing up..."
ifconfig gre0 inet 172.16.0.1 172.16.0.2 netmask 0xffffffff up

echo "[*] GRE tunnel status:"
ifconfig gre0