2
votes
0answers
93 views

graph TCP connection performance based on `ss -i`

A nearby question has brought to my attention the ss utility on Linux, another utility to investigate sockets. It would appear that it may be a great tool to monitor the performance of, say, an ssh ...
2
votes
2answers
132 views

How do I share stdout between multiple processes?

I want to receive live TCP stream, and make it readable by another processes at the same time, without saving it. For example, 111.222.233.244:1234 streams actual time. Server supports only one ...
3
votes
1answer
129 views

Linux:How to tweak TSO and GSO from proc window / sysctl

OS:CentOS 5 I am doing some TCP optimization on my Linux box and want to put ON tcp segmentation offload and generic segmentation offload. I am doing it through ethtool Here is what I am doing: ...
0
votes
0answers
83 views

irc connection timeout problem

I am using tcpredir to connect to freenode server via port 6665 for some firewall difficulties: server:~# redir --lport=6665 --cport=6665 --caddr=irc.freenode.net and recently i faced a problem, i ...
3
votes
1answer
569 views

What does net.ipv4.tcp_app_win do?

I can't figure out why do these variables coexist in Linux. The information from man tcp says (Ubuntu 12.04): For tcp_adv_win_scale: tcp_adv_win_scale (integer; default: 2; since Linux 2.4) ...
4
votes
2answers
350 views

Real-World Use of TCP_DEFER_ACCEPT?

I was perusing the Apache httpd manual online and came across a directive for enabling this. Found a description in the man page for tcp: TCP_DEFER_ACCEPT (since Linux 2.4) Allow a ...
3
votes
5answers
2k views

How can I tell if a TCP port is open or not? [closed]

I am trying to implement socket programming in C. When I try to connect from a client to a server (Ubuntu), it shows an error like "connection failed". So I think the problem is with the port. I am ...
2
votes
1answer
272 views

iptables port forwarding

I have a CentOS server with Java/J2EE(Tomcat) installed on TCP port 8080. I have two interfaces, eth0 and lo. I need to forward all incoming connection on TCP port 80 to 8080. I tried doing the ...
3
votes
1answer
585 views

How to 'free' a TCP port?

I have some code that listens to a specific TCP port. However, when I stop this code and restart it quickly afterwards, I see the error ERROR: could not bind to socket on 0.0.0.0:7700 If I wait a ...
2
votes
2answers
503 views

How do I find out what file Apache is serving when a port is hit?

I'm working on a server someone else set up. The server is CentOS 4.6 running Apache/2.0.59 (httpd). They have an update service setup on port 8443. I know it is working but I need to find out what ...
1
vote
0answers
51 views

configure allowed_tcp_congestion_control via config files in linux kernel

I am trying to come up with a custom set of TCP congestion control variants as part of the tcp_allowed_congestion_control. I do have multiple variants on my tcp_available_congestion_control list but ...
1
vote
0answers
44 views

Can we Bring Up eth1 after removing e1000e modules?

I am trying to setup TCP in RTnet. I am not sure whether its possible. I read that RTnet is not supporting TCP. Is that so? So now I am trying to setup rteth0 as server and eth1 as client. To setup ...
0
votes
0answers
68 views

Socket output from server process disappears when process is run by cron

I'm having a really strange problem that only occurs when a server process is launched by cron. The environment is an Ubuntu 12.0.4 LTS distro running in an Azure VM, with an exposed endpoint to the ...
2
votes
3answers
190 views

Transfer a TCP connection from one Linux box to another behind NAT?

While experiencing an extremely slow download rate on one of my HTTP connections, I thought it'd be nice if I could just transfer the connection from my PC to an energy-saving home server that shares ...
0
votes
0answers
83 views

What could be the possible reasons for bad performance of TCP over Wireless or Sate-lite networks ?

I am running a wireless network having Linux(fedora 17) at sender end.We decided TCP_veno is most useful for my network,so we are using it as default congestion control algorithm.Still, We are not ...
0
votes
1answer
275 views

How to display TCP handshake in Linux [closed]

Hi is there a way to display TCP handshake in Linux? Like for example this WIKI - TCP handshake Not exactly like the illustration but at least it would show client has sent SYN, ACK, FIN etc and the ...
0
votes
1answer
74 views

What are the other congestion control algorithms specially designed for lossy Wireless Networks like LTE and WiMax?

I am trying different congestion control algorithms for getting maximum throughput and minimum delay across my setup for TCP flow.Please suggest other available algorithms apart from Veno, ...
1
vote
1answer
58 views

Enforce strict outbound ports (or ranges) for protocol

Is it possible to narrow the allowed range of outbound ports that can be used for a specific protocol (e.g. HTTP(S))? I understand that, by default, the system will randomly allocate any available ...
1
vote
3answers
1k views

rsh runs perfectly in normal user but not in root, very strange, why?

When I run command, rsh localhost pwd as a root It shows below output. connect to address 127.0.0.1 port 544: Connection refused Trying krb4 rsh... connect to address 127.0.0.1 port 544: Connection ...
1
vote
2answers
990 views

Why TCP TIME-WAIT State is present at both ends after a connection termination?

I am reading how the TCP states work and especially the connection termination part. All of the books or online material I read, shows that for the termination procedure these states are followed ...
3
votes
2answers
409 views

Meaning of log entries from an iptables configuration

My router has Linux as its OS. The system log has a lot of rows about iptable and klogd that I don't understand, could someone explain them to me? The iptables setup: iptables -t nat -A PREROUTING ...
2
votes
1answer
526 views

Memory ussage for TCP or named pipe message buffers?

I have a group of programs that I was stress testing today. I drastically shot up the input load to the program and it worked at first, but I had an apparent memory leak sucking up memory. The only ...
4
votes
0answers
160 views

Socksifying a qemu-kvm using tsocks

I'm trying to socksify a qemu-kvm using tsocks, but I have no success. I don't know if qemu access directly the hardware, skipping the OS or something like that, but I wasn't able to do this feat. ...
4
votes
3answers
331 views

How to measure the time when a packet arrives?

When the packet arrives the NIC generates an interrupt and the kernel then takes over. I want to measure the time at which a packet of a particular TCP flow arrives. How do I do this in Linux? This ...
3
votes
2answers
8k views

Linux Networking routing to virtual ip addresses from a different subnet

New to linux networking, had a question about routing to virtual ip addresses from a different subnet. I have three servers (they can all ping each other): A 10.10.51.182 (connected to router ...
0
votes
2answers
268 views

Why my Http Proxy doesn't reply [SYN,ACK] after received a [SYN] packet from the client?

I have a http proxy running on Linux (RHEL 5.5), intermittently it doesn't reply [SYN,ACK] packet after received a [SYN] packet from the client. This issue can be recovered by restarting the proxy. I ...
3
votes
1answer
3k views

Kill TIME_WAIT sockets immediately?

Is there anyway to kill those TIME_WAIT sockets immediately ? e.g output of netstat: tcp 0 0 127.0.0.1:8080 127.0.0.1:41500 TIME_WAIT - tcp 0 ...
19
votes
1answer
3k views

Why doesn't Linux use the IANA Ephemeral port range?

According to Wikipedia The Internet Assigned Numbers Authority (IANA) suggests the range 49152 to 65535 for dynamic or private ports. Many Linux kernels use the port range 32768 to 61000. Even ...
2
votes
1answer
1k views

/dev/tcp not present in Linux

I am porting C/pro*c code from UNIX to Linux. The code is: #define __NFDBIT (8 * sizeof(unsigned long)) #define __FD_SETSIZ 1024 #define __FDSET_LONG (__FD_SETSIZ/__NFDBIT) typedef struct ...
3
votes
1answer
302 views

Route incoming network requests for a given port to different applications

I have an application that listens for connections on a port, but I occasionally take it down for updates and the like. I'd like a way to configure the system such that if that program is running, ...
1
vote
1answer
355 views

How to limit all tcp traffic to the network interface the session was initiated on?

I have an embedded linux system with two network interfaces (lan0, wlan0) that are configured to the same subnet. A server on this system accepts tcp connections on both interfaces. How I can assure ...
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 ...
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, ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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?
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 ...
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 ...