tinycodinglm / sys /sys-0042.jsonl
winapiadmin's picture
Upload folder using huggingface_hub (part 19)
034ba67 verified
|
Raw History Blame Contribute Delete
1.69 kB
{"type": "session", "harness": "deepseek-harness", "id": "sys-0042", "name": "WireGuard VPN setup"}
{"type": "message", "message": {"role": "system", "content": "You are an expert software engineer and technical assistant. You provide accurate, detailed, and practical answers. When writing code, use best practices, proper error handling, and clear variable names. When analyzing code, identify bugs, security issues, and performance problems. You have deep knowledge of C/C++, Windows API, Python, and many other technologies."}}
{"type": "message", "message": {"role": "user", "content": "How do I set up WireGuard VPN?"}}
{"type": "message", "message": {"role": "assistant", "content": "```ini\n# /etc/wireguard/wg0.conf (server)\n[Interface]\nPrivateKey = <server-private-key>\nAddress = 10.0.0.1/24\nListenPort = 51820\nPostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE\nPostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE\n\n[Peer]\nPublicKey = <client1-public-key>\nAllowedIPs = 10.0.0.2/32\n\n[Peer]\nPublicKey = <client2-public-key>\nAllowedIPs = 10.0.0.3/32\n```\n\n```ini\n# /etc/wireguard/wg0.conf (client)\n[Interface]\nPrivateKey = <client-private-key>\nAddress = 10.0.0.2/24\nDNS = 1.1.1.1\n\n[Peer]\nPublicKey = <server-public-key>\nEndpoint = server.example.com:51820\nAllowedIPs = 0.0.0.0/0 # route all traffic\nPersistentKeepalive = 25\n```\n\n```bash\n# Generate keys\nwg genkey | tee privatekey | wg pubkey > publickey\n\n# Start/stop\nwg-quick up wg0\nwg-quick down wg0\nsystemctl enable wg-quick@wg0\n\n# Show status\nwg show\nwg show wg0 transfer\n```"}}