Skip to content

Instantly share code, notes, and snippets.

@gartnera
Last active February 18, 2025 23:25
Show Gist options
  • Save gartnera/31cafc3d0dcdfb5bf0f5a2192e3fbe2c to your computer and use it in GitHub Desktop.
Save gartnera/31cafc3d0dcdfb5bf0f5a2192e3fbe2c to your computer and use it in GitHub Desktop.

Revisions

  1. gartnera revised this gist Feb 18, 2025. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion tcp-forward.service
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@ After=network.target
    Type=simple
    User=nobody
    Group=nobody
    ExecStart=/usr/bin/socat TCP-LISTEN:9000,reuseaddr,fork TCP:9001,reuseaddr
    ExecStart=/usr/bin/socat TCP-LISTEN:9000,reuseaddr,fork TCP:9001
    Restart=always

    [Install]
  2. gartnera revised this gist Feb 18, 2025. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion tcp-forward.service
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@ After=network.target
    Type=simple
    User=nobody
    Group=nobody
    ExecStart=/usr/bin/socat TCP-LISTEN:9000,reuseaddr,fork TCP-LISTEN:9001,reuseaddr
    ExecStart=/usr/bin/socat TCP-LISTEN:9000,reuseaddr,fork TCP:9001,reuseaddr
    Restart=always

    [Install]
  3. gartnera created this gist Jan 14, 2017.
    13 changes: 13 additions & 0 deletions tcp-forward.service
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    [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