The Transport Control Protocol (TCP) is a low-level part of the protocol stack used by the Internet. It sits directly above the IP layer and is responsible for making sure that dropped packets are resent.

learn more… | top users | synonyms

14
votes
1answer
16k 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 ...
10
votes
1answer
1k views

Kernel socket structure and TCP_DIAG

I'm working on a software which connects to a Real Time data server (using TCP) and I have some connections dropping. My guess is that the clients do not read the data coming from the server fast ...
2
votes
1answer
570 views

Port Mirroring in Fedora?

I have set up an application that listens constantly to a port for network packets, and I would like to create another one that receives the same network packets ( for use as a test bed). Getting the ...
2
votes
2answers
831 views

200ms latency between TCP send and tcpdump only with large messages

In our REHL server, latency between application send and tcpdump log is always very large for large messages, about 200 milliseconds (see below 697572-488690=208882 microseconds), whereas latency for ...
0
votes
1answer
249 views

php mail not working in rhel server?

I have installed roundcube mail and when it tried to use installer which uses php mail it is loading for 5 to 10 minutes and then telling me 'ok' but no mail comes to me. smtp_port is 25 host is ...
6
votes
3answers
3k views

What is the formula to determine how much memory a socket consumes under Linux?

I'm doing some capacity planning and I was wondering if there is a formula that I could use to predict (from a memory standpoint) how many TCP connections I could handle on my server. At the moment, ...
6
votes
4answers
8k 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 ...
5
votes
2answers
7k views

How to configure SVN/SSH with SSH on non standard port?

I have configured SSH to be on port 20000. When I try: svn co svn+ssh://server.com:20000/home/svn/proj1 proj1 --username jm I get svn: To better debug SSH connection problems, remove the -q ...
0
votes
1answer
2k views

How to run tcptraceroute utility on UNIX machine?

How can I run the tcptraceroute utility on a UNIX machine? I want to run a TCP traceroute for port 80.
6
votes
3answers
1k views

Faster alternatives to lsof

I want to extract the process id of a certain process in order to shut it down. The process is a local web server using a certain port (localhost:3000), and I am currently doing it like this to ...
3
votes
2answers
498 views

How to listen to all ports (UDP and TCP) or make them all appear open in Debian

I got an external Debian server. The problem is that my university campus doesn't allow connections to go outside when the port is different than TCP port 22, 80, 443, or UDP port 123. I tested them ...
4
votes
1answer
357 views

How can I trigger a script when a certain port becomes available for requests?

I want to trigger a script when port 3000 is opened by a process. The process is a Rails development server, and I just want to be notified when it finishes spinning up and port 3000 starts accepting ...
8
votes
1answer
861 views

what level of the network stack does tcpdump get its info from?

As I was trying in vain to fix a faulty ethernet controller here, one thing I tried was running tcpdump on the machine. I found it interesting that tcpdump was able to detect that some of the ICMP ...
2
votes
2answers
2k views

Solaris Command to Stop Listening on a Port

I have a legacy application (that I do not control) that occasionally crashes without properly closing the ports it is listening on. Is there a Solaris command to stop listening on a given port, ...
8
votes
2answers
1k views

minimal TCP MSS in Linux

The TCP MSS in Linux must be at least 88 (include/net/tcp.h): /* Minimal accepted MSS. It is (60+60+8) - (20+20). */ #define TCP_MIN_MSS 88U My question is: where did they come up with ...
3
votes
1answer
2k 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 ...
0
votes
1answer
1k views

How to do “netcat” relays properly so that I have more control?

How to use the netcat to have relays? Like following I tried but not working: cd /tmp mknod backpipe p nc -l -p 7007 0<backpipe | nc 192.168.1.101 9001 | tee backpipe I want to receive data on ...
4
votes
3answers
1k views

IPTables and transparent proxies

I have set up a local, transparent TCP proxy on localhost. I want to redirect ALL TCP traffic to this proxy, so it can handle it and nothing "leaks out," circumventing the proxy. I need to use ...
0
votes
1answer
624 views

Can't connect remotely to server running redhat (ec2)

I created a RedHat 6.1 VM with EC2. Logged in as root, I installed (unzipped) JDK1.7 in /root/bin/jdk1.7.0 and installed (unzipped) GlassFish 3.1.1 in /root/bin/glassfish3. I set JAVA_HOME and ...
3
votes
2answers
2k views

SSH tunnel to router periodically hangs. TCP problem?

Something weird I've noticed since upgrading my office router to the Buffalo WZR-HP-G300NH. When I remote in using an SSH tunnel, the tunnel will "freeze" pretty often. The freeze lasts 1-2 minutes ...
10
votes
1answer
3k 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 ...
3
votes
2answers
150 views

How to detect out-bound port from PID

I have several applications that run on random ports. How would I take the pid or the file location and find which port it is running on? Example of desired output: www-data/apache = 80 ...
5
votes
1answer
2k views

How long is a TCP local socket address that has been bound unavailable after closing?

On Linux (my live servers are on RHEL 5.5 - the LXR links below are to the kernel version in that), man 7 ip says: A TCP local socket address that has been bound is unavailable for some time after ...
16
votes
1answer
7k 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 ...
4
votes
2answers
1k views

What tools do I need to intercept and change an incoming packet on a WP2-Personal wifi hub

Which tools should I research into to intercept a plain text packet, edit it and then continue it on it's way. I am using Ubuntu 11.04 and Backtrack 5; my wifi is WPA2-person encrypted. I need to edit ...
5
votes
1answer
4k 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 ...
2
votes
2answers
2k views

How to fake the source-port of a TCP packet?

Is there an easy way (or is it possible at all) to rewrite a TCP packet as it leaves the machine? For example if I run telnet binfalse.de 22 it will search for an unused port to leave the machine. ...
0
votes
1answer
415 views

port redirection with PF under OpenBSD

i need to do a setting a bit unusual. I have 3 machines with public Ips. I want to use one of them as a load balancer for the 2 others. My machine >> machine1 who redirect the connection to machine ...
7
votes
3answers
8k views

How do I reserve ports for my application?

How do I reserve a list of ports for my custom applications? To be specific, the product I'm creating has a lot of processes and a lot of intercommunication between them. The problem I'm having is ...
-1
votes
2answers
704 views

How to get info about given webserver FAST?

$ time nmap -q -sV -P0 -p80 google.com | fgrep '80/tcp open' 80/tcp open http Google httpd 2.0 (GFE) real 0m6.563s user 0m0.280s sys 0m0.016s $ Are there any faster methods to get info ...
3
votes
1answer
584 views

Bind unprivileged application to privileged port on Mac OS X

I'd like to create launchd.plist file for an httpd server. Problem is - when the httpd is run as privileged user it daemonizes, which is not allowed by launchd.plist manual page. If I don't run it as ...
15
votes
2answers
9k views

how to check rx ring, max_backlog, and max_syn_backlog size

Quite often in the course of troubleshooting and tuning things I find myself thinking about the following Linux kernel settings: net.core.netdev_max_backlog net.ipv4.tcp_max_syn_backlog ...
2
votes
3answers
359 views

Port monitoring on GNU/Linux based NAT router

I am using a Ubuntu machine as a NAT router. How can I find out the following: the ports on which the LAN machines are listening or communicating (both tcp and udp); which local machines have ...
15
votes
6answers
14k 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?
3
votes
3answers
1k views

Simple way to create a tunnel from one local port to another?

I have a development server, which is only accessible from 127.0.0.1:8000, not 192.168.1.x:8000. As a quick hack, is there a way to set up something to listen on another port (say, 8001) so that from ...
8
votes
2answers
35k 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 ...
16
votes
5answers
22k views

Determining what process is bound to a port

I know that using the command: lsof -i TCP (or some variant of parameters with lsof) I can determine which process is bound to a particular port. This is useful say if I'm trying to start ...
2
votes
1answer
1k views

Need further explanation on TIME_WAIT

Hi Unix/Linux Gurus out there! I need a solid proof that TIME_WAIT (a lot of it actually) is the real culprit in the slowdown in one of our servers. The server is hosted on Parallels Baremetal ...
1
vote
1answer
417 views

Select YeAH-TCP like congestion control algorithm to configure kernel

I'm configuring/compiling the 2.6.37 kernel and I want select YeAH-TCP like default congestion control algorithm but, although I enable this option (CONFIG_TCP_CONG_YEAH), it doesn't show in the ...
4
votes
4answers
6k views

testing services/open ports with telnet?

I often see that folks test ports this way: //shell telnet ip-address 80 telnet ip-address 25 AFAIK telnet was the old way of getting onto some remote box - right? or so I thought... Why exactly ...
1
vote
1answer
150 views

vnc over ssh port assignment

At the office I have on the servers a vnc server running. In Windows I use putty to connect to the server, I log in and then use realvnc to see the desktop. But I cannot get this to work on Linux. I ...