Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
systemd service to forward traffic from port 9000 to 9001. Useful for getting around NAT.
[Unit]
Description=Forward TCP from 9000 to 9001 (bidirectional)
After=network.target
[Service]
Type=simple
User=nobody
Group=nobody
ExecStart=/usr/bin/socat TCP-LISTEN:9000,reuseaddr,fork TCP-LISTEN:9001,reuseaddr
Restart=always
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment