rete:socat:servizio_redirect_tcp
Creare un redirect tcp con Socat
Autore: Fabio Di Matteo
Ultima revisione: 02/05/2025 - 11:31
Creare un servizio di redirect tcp con Socat è alquanto semplice. Basta creare e abilitare una unit Systemd come segue:
/etc/systemd/system/socat-redir.service
[Unit] Description=Socat Redirection Service After=network.target [Service] ExecStart=/usr/bin/socat TCP-LISTEN:1234,fork TCP:remote-server:5678 Restart=always RestartSec=5 [Install] WantedBy=multi-user.target
Avviare e abilitare la unit con:
sudo systemctl daemon-reload sudo systemctl enable --now socat-redir.service
Da considerare che “remote -server” potrebbe essere anche un indirizzo locale , oppure un indirizzo associato a un servizio vpn in esecuzione sullo stesso server .
rete/socat/servizio_redirect_tcp.txt · Ultima modifica: 08/05/2025 10:02 da 127.0.0.1