Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #181835

Re: TCP proxy for host on subnet

From Greg Wooledge <wooledg@eeg.ccf.org>
Newsgroups linux.debian.user
Subject Re: TCP proxy for host on subnet
Date 2017-06-06 19:10 +0200
Message-ID <tPq9s-3eA-13@gated-at.bofh.it> (permalink)
References <tOYwx-2jk-3@gated-at.bofh.it> <tP0oF-3td-1@gated-at.bofh.it> <tPjrj-6ZD-11@gated-at.bofh.it> <tPmSe-YB-3@gated-at.bofh.it> <tPpGq-2N6-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Jun 06, 2017 at 05:39:19PM +0100, Ron Leach wrote:
> 2.  socat did not 'detach' from the keyboard session, so the screen 
> remained with a blank line and no shell prompt.  [This means that if I 
> invoke a solution this way, I will have to have a session running all 
> the time that I want socat to run.]

Excellent.  Services should be foreground processes, exactly like
this.  You're running it in a terminal now, because you're still in
the testing stages.

Once you're ready to deploy it, you would want to set it up as an
automatically respawning service, under systemd or one of the other
service managers.  E.g. under systemd, you'd create a file in
/etc/systemd/system/ with a name ending with .service and contents
something like this:

==============================================
[Unit]
Description=Your description
After=network.target

[Service]
ExecStart=/usr/bin/socat ...
KillMode=process
Restart=on-failure

[Install]
WantedBy=multi-user.target
==============================================

Then "systemctl daemon-reload" and "systemctl enable yourservice.service"
and "systemctl start yourservice.service" and you're done.

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

TCP proxy for host on subnet Ron Leach <ronleach@tesco.net> - 2017-06-05 13:40 +0200
  Re: TCP proxy for host on subnet Darac Marjal <mailinglist@darac.org.uk> - 2017-06-05 15:30 +0200
  Re: TCP proxy for host on subnet Henning <henning@itcfollmann.com> - 2017-06-05 15:40 +0200
    Re: TCP proxy for host on subnet Ron Leach <ronleach@tesco.net> - 2017-06-06 12:00 +0200
      Re: TCP proxy for host on subnet <tomas@tuxteam.de> - 2017-06-06 12:50 +0200
        Re: TCP proxy for host on subnet Henning Follmann <hfollmann@itcfollmann.com> - 2017-06-06 15:30 +0200
          Re: TCP proxy for host on subnet tomas@tuxteam.de - 2017-06-06 16:30 +0200
      Re: TCP proxy for host on subnet Henning Follmann <hfollmann@itcfollmann.com> - 2017-06-06 15:40 +0200
        Re: TCP proxy for host on subnet Ron Leach <ronleach@tesco.net> - 2017-06-06 18:40 +0200
          Re: TCP proxy for host on subnet Greg Wooledge <wooledg@eeg.ccf.org> - 2017-06-06 19:10 +0200
            Re: TCP proxy for host on subnet Ron Leach <ronleach@tesco.net> - 2017-06-10 13:00 +0200
              Re: TCP proxy for host on subnet <tomas@tuxteam.de> - 2017-06-10 15:30 +0200
                Re: TCP proxy for host on subnet Greg Wooledge <wooledg@eeg.ccf.org> - 2017-06-13 14:40 +0200
                Re: TCP proxy for host on subnet <tomas@tuxteam.de> - 2017-06-13 21:20 +0200

csiph-web