Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [tcp]

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.

0
votes
0answers
18 views

Matching TCP Connections to PIDs? (tcptrack)

With tcptrack, I'm able to monitor and see a bunch of connections happening periodically between various IPs on the local machine to a remote machine. The connections are SSH connections (can confirm ...
1
vote
0answers
22 views

Understanding how MobaXterm keeps an ssh connection alive

I want to have a stable ssh connection to a server where I do things. That would last for days or weeks. In general, one can set TCP keepalive to more than 7200 seconds: Socket reset by peer ever 2 ...
0
votes
0answers
34 views

TCP in established state with inode of 0

Intermittently, on a raspberry pi running raspbian, I see bizarre behaviour with (one of several) established TCP connections. The receiver has what he believes is a valid open socket gotten from ...
0
votes
1answer
33 views

Locally forward tcp port bidirectional

I wonder how it is possible to locally forward a tcp port, bidirectional, i. e. all packets leaving the local machine on port 25 (this port of course is actually dynamically assigned) should be ...
-1
votes
1answer
18 views

Restrict inbound access on localhost:TCP port

For reasons beyond my control, I have a binary that binds to TCP "localhost:$PORT". (Unix socket bindings would make this question moot). If I understand correctly, this means that although no ...
1
vote
0answers
25 views

Total socket count steadily increasing, tcp/udp sockets steady. Why?

I have a server (Ubuntu 16.04.5) running sockets.io and a few other things. This server is running about 5 or 6 different python apps and sockets.io. When the server reaches this level of ~6144 ...
1
vote
1answer
31 views

max no of tcp connections on a linux system

I know that /etc/security/limits.conf provides the persistent soft and hard limits for several values. However, in the relevant list there is no indication about imposed limits on: a) concurrent ...
0
votes
2answers
39 views

Telnet - how to verify why a port is blocked?

We have linux machines with RedHat 6.5 operating system. When we try to telnet to localhost on port 8182, we get connection refused: service iptables status Firewall is not running telnet localhost ...
0
votes
1answer
40 views

How to close one side of a TCP connection leaving other side hanging open? (No FIN or RST sent)

I am trying to recreate a scenario where a Solaris client is connected to a Linux server via TCP socket, but the client side of the connection suddenly goes down without sending sending a FIN or RST ...
1
vote
1answer
65 views

Deployment of haproxy between devices and Syslog server

Below is the current architecture of Syslog-NG to avoid single point of failure. Currently devices send same syslog message to two syslog servers listening on UDP port 514. Each server stores the ...
0
votes
1answer
25 views

nc getting stuck unexpectedly

I expected this: nc -l localhost 7000 </dev/null & nc localhost 7000 </etc/profile and this nc -l localhost 7000 </etc/profile & nc localhost 7000 </dev/null to finish after ...
0
votes
0answers
21 views

Why do we use sk_wmem_alloc in linux kernel?

I am analysing TCP kernel source code on kernel version 4.9.59 I learn about sk_wmem_queued variable thanking to refering to TCP-IP Architecture, Design and implementation in Linux book. From ...
0
votes
0answers
33 views

Executing a script after a TCP connection closes

As the title mentions, I'm trying to figure out a way to execute a given script (a file) after a TCP connection closes, and if possible filter out the interface it was going through. Now, what i want ...
1
vote
0answers
28 views

Is is possible to disable TCP timestamping per-connection?

I am writing simple TCP/IP client (in python, later perhaps using ASIO or Qt) for an embedded system which rejects connections when the first SYN packet uses TCP timestamps. I can make it working by ...
0
votes
0answers
27 views

Load-balancing through multiple interfaces on the same server using Nginx

I'm testing proxy server with combination of Nginx TCP load balancing and SNI based HTTPS proxy. In my testing debian box I have following interfaces configured eth0 192.168.1.10 - proxy eth0:1 ...
1
vote
1answer
32 views

TCP variants under lsmod

I was reading about how TCP congestion variants are implemented in Linux. Each variant is implemented as a separate module. When I had read this question: Add TCP congestion control variant to Linux ...
0
votes
0answers
81 views

Transmission Control Block Size used in TCP

How can I find out the Transmission Control Block Size used in different Operating Systems, such as Linux and Mac OS?
0
votes
0answers
34 views

How to calculate packet loss ratio based on TCP segment?

I'm trying to calculate packet loss ratio to assess the quality of network based on 'netstat -s' command. My algorithm is below: step 1: send1 = the amount of 'segments send out' , retransmited1 = ...
1
vote
0answers
99 views

order of rules' processing in iptables chains [closed]

Isn't the order of processing the rules in iptables top to bottom? Given the following example; Chain DOCKER (2 references) target prot opt source destination RETURN ...
0
votes
0answers
87 views

TCP RST flag (windows vs linux)

I have broken client who I need to serv, and I can't change it or affect it in any way. I put same software serwer on windows and on linux. Windows is working, linux is not. After analyzing I figured ...
1
vote
1answer
153 views

How does MTR (run with TCP protocol) calculate the loss rate?

I thought TCP protocol itself will guarantee not to loose any bytes while connecting. About this viewpoint, please refer to https://stackoverflow.com/questions/23841896/will-tcp-connection-lose-...
0
votes
1answer
134 views

How to find the cause of TCP RST on Linux (Ubuntu Server)

In my mail server I'm getting high TCP reset send between working hours, as shown in this grafic: This is a capture of the server traffic filter by tcp-rst: When I run "netstat -i" I get this: ...
1
vote
2answers
169 views

Send TCP packet to the same source [closed]

I want to design a system which reduce travel time of packet what is happening in reality is I send a SYN bit from client side, this bit travel through router then to server and server reply SYN+ACK ...
1
vote
3answers
95 views

Is it possible to spoof a successful TCP connection with iptables?

Typically with IP tables you would either drop or reject traffic. For TCP is there a way to have iptables instead send a syn back but forget the connection?
0
votes
0answers
68 views

Different behavior between kernel 4.8 and 4.10 when receives the SYN packet

I have two Linux servers. server A: 4.8 server B: 4.10 There is a socket running on each server and listen at port 9999 with concurrent request limit as 1. When all concurrent request threads of A ...
2
votes
1answer
178 views

How to change TCP congestion control algorithm on OpenBSD?

On FreeBSD, I can change the TCP congestion control algorithm via net.inet.tcp.cc.algorithm. On OpenBSD, there is no net.inet.tcp.cc.algorithm parameter. So, here is the question: How to change TCP ...
0
votes
1answer
247 views

Get IP address of socket used by process

given a process Id (that use sockets), I would like to get the IP on socket endpoints. e.g When new SSH session is created, the sshd demon fork process per session. I want to get the IP endpoints ...
-1
votes
1answer
39 views

How to open up a tcp server compatible with tcpgoon

I have tcpgoon installed on one computer, provided that there is a direct VLAN connection, how do I create a TCP server on my second computer?
2
votes
1answer
36 views

How can I be sure that an application is running on same cpu/core that its TCP send flow is?

Let's suppose the following (very simplified egress tcp queuing) flow: -->[app (nginx)] -->[send_buffer(tcp_wmem)] -->(qdisc txqueuelen) -->[ring buffer(tx_rx)] -->(dma) -->[...
1
vote
1answer
230 views

connect to server with netcat and receive *multiple* files with one request/connection

Say I have an http or tcp server running, which serves tarballs (.tgz files). Is there some way I can receive files individually so I can do something like this: nc localhost 5000 | how can I read ...
2
votes
1answer
119 views

How do I make ppp reliable over lossy radio modems using pppd and tcp kernel settings on debian?

I am having a lot of trouble establishing a reliable ppp / tcpip link between two debian systems over radio modems. My hardware topology is a little complex. The system uses: Raspberry Pi 3B at ...
1
vote
2answers
628 views

How can I detect if telnet is running on a server?

I have a digital scope, with LAN connection. I'd like to check if telnet is running on the scope (the manual doesn't say so, but then the manual doesn't offer anything useful about the LAN port). I ...
0
votes
0answers
241 views

Send response based on netcat client request

I am trying to create a socket where the client receives a response based on their request, but I can not figure out how to achieve this on CentOS 7. Until now I have the socket opened on port 100 ...
0
votes
1answer
35 views

How can I run this tcp command in Ubuntu? [closed]

I want to run this command in Ubuntu: tcp 0 0 0.0.0.0:50010 0.0.0.0:* LISTEN <pid>/java but tcp is not recognized in Ubuntu. What could be an alternative for this?
0
votes
0answers
38 views

mtu 9000 issues only on tcp and not icmp possible?

I have a connection between two datacenters and rsync between them stalls often. I think it is related to the mtu 9000 (I actualy set it to 8900 because of some possible vlan use) I have the ...
0
votes
1answer
66 views

Using bash for tcp connections

In order to redirect the tcp connections with bash, why the following commands return nothing? [root@rocks7 ~]# echo -e "GET / HTTP/1.1\n\n" > /dev/tcp/yahoo.com/80 [root@rocks7 ~]# printf "GET / ...
0
votes
1answer
32 views

How is data transfer initiated in TCP?

Conceptually, I think of a TCP connection as having two aspects. The "connection" - i.e. an arrangement where the two hosts "agree" to commnunicate with each other. loosely analogous to calling ...
1
vote
1answer
237 views

Read and write to same netcat tcp connection

I have this pipeline: ( tail -f ${named_pipe} | nc localhost ${port} | ql_conditional_release &> "$HOME/debug.log" & disown; ) &> /dev/null so I am reading from the netcat ...
2
votes
2answers
46 views

Distinct network subnet masks

I understand that 192.168.1.0/24 & 10.0.0.0/24 are distinct networks however are the following also distinct networks? 10.0.0.0/24 & 10.0.8.0/24 10.0.0.0/8 & 10.0.8.0/24 I have a LAN ...
0
votes
0answers
65 views

spurious TCP reset with IP id 0 from linux based forwarder

I am trying to debug an issue with spurious TCP reset being sent by a linux based device that forward traffic from one interface to another after doing a NAT. The setup is something like this client -...
3
votes
2answers
49 views

how to make a secure local port as a normal user

I am working on a shared linux server as a normal user with no root access. Can I start a program listening on a local tcp port, and be the only user able to connect to that port? I can control the ...
0
votes
0answers
294 views

Linux TCP connection limit without netfilter/conntrack

While investigating performance issues on a RHEL6 server with apache 2.2, I ran into an interesting question. This server does not load the netfilter/nf_conntrack modules, and thus has no net....
0
votes
0answers
16 views

port-forwarding to connect application

I have one application running say A . A is tpc server with port 8887. My remote location tcp clinet communicate with my pc with port number 9997. now i want forwared all incoming data of port 9997 ...
2
votes
0answers
150 views

Use tcpdump to capture TCP transmitted data withouth the protocol's details (similar to tcpflow)

I use tcpflow a lot to capture data transmitted as part of TCP connections. It allows you to see the transmitted data without any of the TCP protocol details. Is there a way to accomplish the same ...
1
vote
0answers
76 views

TCP Stack tuning,(TIME_WAIT) - python process ignores sysctl setting?

I'm playing around with tuning various tcp settings for high number of outgoing client connections. I've put following in my /etc/sysctl.conf on Ubuntu 16.04. net.ipv4.ip_local_port_range = 18000 ...
2
votes
1answer
176 views

Advantage of using “--syn” for matching new TCP connections

I have seen a similar technique used in several iptables examples for matching new connections: -A INPUT -p tcp -m tcp --dport 443 --syn -m conntrack --ctstate NEW -j SSH As seen above, TCP ...
0
votes
0answers
84 views

boost::asio::write taking huge time while writing data at particular time

I have written a program on Linux in C++ which connects to a server and sends/receives data using boost::asio write/read. At the peak time when the server starts as there may be number of users ...
0
votes
0answers
201 views

How to confirm if rsyslog transmit only UDP mode

We have rsyslog conifigured and configured is as below $ grep -vE '^#|^$' /etc/rsyslog.conf $ModLoad imuxsock # provides support for local system logging (e.g. via logger command) $ModLoad imklog #...
0
votes
0answers
275 views

What means tcpi_rcv_rtt parameters into tcp_info data?

The struct tcp_info define follow parameters which describe rtt functional: tcpi_rtt tcpi_rttvar tcpi_rcv_rtt What means tcpi_rcv_rtt parameter? The RFC 6298 operate only two state variables - SRTT ...
1
vote
2answers
601 views

ufw allowed port 9999 but connection refused

port is allowed however connection is refued? # sudo ufw allow 9999/tcp Rule added Rule added (v6) When I check status # sudo ufw status 9999/tcp ALLOW Anywhere 9999/tcp (v6)...