Tagged Questions

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

4
votes
1answer
443 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 ...
9
votes
1answer
1k 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
3k 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
2k 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
3k 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
2k 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
684 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 ...
13
votes
1answer
4k 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
168 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 ...
6
votes
1answer
3k 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 ...
20
votes
1answer
9k 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
2k 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
5k 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
3k 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
489 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 ...
9
votes
3answers
11k 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 ...
0
votes
3answers
891 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 ...
4
votes
1answer
648 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 ...
18
votes
2answers
12k 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
398 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 ...
18
votes
6answers
20k 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
2k 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 ...
12
votes
2answers
44k 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 ...
21
votes
5answers
35k 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
502 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
9k 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
163 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 ...