The tcp tag has no wiki summary.
8
votes
1answer
1k views
How can I configure a reverse SSH connection to the connecting computer?
I'm going to be deploying a number of machines in the near future which will be behind routers. It won't be feasible to set up dynamic DNS on each router and port forwarding, so is there a way I can ...
6
votes
1answer
6k views
How does tcp-keepalive work in ssh?
I am trying to code a shell-script that uses a ssh-connection for doing "heartbeats". I want to terminate the client- and server-side of that connection after a certain timeout (after the connection ...
4
votes
1answer
2k views
iptables port-mirroring
I need to be able to get a copy of packets received on port 8001 to port 8002. I have tried the following but I get an error that --tee is undefined.
sudo iptables -t nat -A PREROUTING -p TCP -s ...
4
votes
4answers
4k views
Logging outgoing connections as they happen
Is there a way to log to file all the outgoing connections that a process creates? I am aware of Netstat but that seems to be more of a snapshot of a point in time rather than something that runs and ...
8
votes
2answers
20k views
Orphaned connections in CLOSE_WAIT state
I've got a SLES machine that accumulates TCP connections in a CLOSE_WAIT state for what appears to be forever. These descriptors eventually suck up all available memory. At the moment, I've got 3037 ...
12
votes
1answer
3k views
Why are the first 1024 ports restricted to the root user only?
This is more idle curiosity than anything else. A friend of mine asked me 'which port range is it that only root can use under Linux?' I told him 0-1024 were restricted. Then he asked my why it was so ...
3
votes
1answer
1k views
socat reliable file transfer over TCP
I am aware of disadvantages of "wait->stop" design, that usually is proposed with netcat:
server$ cat test.dat | nc -q 10 -l -p 7878
client$ nc -w 10 remotehost 7878 > out.dat
(It's not reliable ...
12
votes
4answers
539 views
TCP dies on a Linux laptop
Once in several days I have the following problem. My laptop (Debian testing)
suddenly becomes unable to work with TCP connections to the internet.
The following things continue working fine:
UDP ...
12
votes
5answers
8k views
Linux: allowing an user to listen to a port below 1024
I need to allow an user (different from root) to run a server listening on port 80.
Is there any way to do this?
2
votes
1answer
241 views
Why can't I use strace with rsh?
If I run rsh, it works, but prints some strange “Connection refused” messages at the beginning:
$ rsh localhost pwd
connect to address 127.0.0.1 port 544: Connection refused
Trying krb4 rsh...
...