Stack Exchange Network

Stack Exchange network consists of 175 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.

-1
votes
0answers
19 views

SCHED_FIFO and select

I have a multi-threaded app with the SCHED_FIFO scheduling policy. I send/receive commands through a TCP connection (CAN bus soon). Command reception triggers some work. The basic idea was to handle ...
1
vote
1answer
18 views

Default TCP KeepAlive settings

The TCP KeepAlive (socket option SO_KEEPALIVE) is governed by three options—time after which the mechanism triggers, probing interval, and number of failed probes after which the connecting is ...
0
votes
0answers
21 views

TCP performance for OpenVPN vs delay

I have got some issue in TCP performance depended on delay. My lab schema: CPE --- (p1) Router (p2) --- Server The CPE connects to the Server by OpenVPN using TCP. I know about TCP-over-TCP but ...
2
votes
2answers
168 views

How to use bash to create a socket server and allow multiple clients in the same port?

I have 4 programs, will be increased in the future, these programs have to connect to the same ip:port to send and receive messages at the same time. Until now I have the socket opened, I also would ...
1
vote
0answers
48 views

kernel TCP/IP implementation - about accept queue

I'm recently learning the TCP/IP implementation in linux kernel(version 4.4), and got really confused about the accept queue. I know there is a queue in struct inet_connection_sock which is called a ...
0
votes
1answer
73 views

How to disable TCP checksum validation on Linux?

For some reason, I want to disable TCP checksum validation on my Linux host. Is that possible to disable it?
0
votes
0answers
32 views

Why the ssh port tcp connection have more than 10000 Send-Q?

I use netstat -an, find my ssh tcp the Send-Q is very high(15336), [root@server146 ~]# netstat -an Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address ...
2
votes
1answer
77 views

How to connect to a IPv6 service using IPv4 connection on CentOS 7?

I'm trying to work out how to connect an inbound IPv4 connection to a port listening on a IPv6 port on a CentOS box. To demonstrate on a vanilla CentOS 7 server: Confirm bindV6only is disabled $...
-1
votes
3answers
212 views

How to send literal string over TCP (netcat/socat-like), but provided by command arguments?

If I want to send a string over TCP in a shell environment, I can do something like: echo text | nc 1.2.3.4 9876 Cool. Interactively, that works. Now I want to do this programmatically by spawning a ...
-1
votes
1answer
19 views

reusing same port in a tcp application under different namespaces on linux VM

i have a linux VM with 2 interfaces, eth0 has mgmt IP and eth1 has configuration as below ip netns exec eng51 ifconfig eth1.51 Link encap:Ethernet HWaddr 52:54:00:bd:68:c3 inet addr:51.51....
-1
votes
1answer
28 views

Can TCP kill be used to stop a foreign nmap scan?

Suppose I know that a certain ip on my local host (say 192.168.0.3) is performing an nmap scan (or executing a script) on me. Is it possible to stop the scan using tcpkill?
0
votes
0answers
46 views

How Can I Kill Sockets Related to Services on Localhost?

I am trying to close sockets related to my webserver so the client does not have to refresh the browser twice to connect to the new webserver. I have successfully written a bash script which can ...
0
votes
1answer
46 views

how to turn off tcp timestamps?

I tried to turn off the tcp timestamp but it didn't work. The step i performed are the following: $ sysctl -w net.ipv4.tcp_timestamps=0 $ sysctl -p $ sysctl net.ipv4.tcp_timestamps (=> to be sure ...
0
votes
0answers
33 views

port forwarding using mptcp

I installed mptcp on two systems mptcp installation I followed this site to install mptcp and its working perfectly I check this site also mptcp check both systems will work perfectly. I want to ...
3
votes
2answers
184 views

Has the filtering of all kinds of TCP attacks using iptables become obsolete as they get filtered elsewhere or something else?

Background I am on Debian 10 Buster. I started running a Tor relay on my home IP address. A dedicated full-fledged server is probably not the most energy efficient way, but I want to try it out. And ...
0
votes
0answers
25 views

Traffic Generation

I require to generate TCP flows of various sizes and need to generate them after varying intervals. I also need to modify DSCP value of each packet based on it's flow size. What possible tools can I ...
1
vote
1answer
50 views

Virtualized firewall on KVM

I have few vms (homelab) virtualized with KVM (CentOS7) and connected to my home network. Lately I tried to isolate them by putting them in separate network and I wanted to do so with virtualized ...
0
votes
1answer
52 views

How to send data from Raspberry pi to Remote SQL DB without installing mysql or mysql Client

I would like send some port checking data and a timestamp ( both saved as a variable) to my remote Mysql DB running on a linux Node machine . I don't want install sql or sql client in Pi because the ...
0
votes
2answers
198 views

Linux's Internet domain socket, transport protocols (TCP/UDP)'s socket and port

I have been bothered for a long while by some confusions among internet domain socket provided by Linux, transport protocols (TCP/UDP)'s socket and transport protocols (TCP/UDP)'s port. ...
0
votes
0answers
55 views

Why can I not kill a process in the same line I start it using fuser?

I have been trying to kill a process by looking at the listening port and nothing seems to be working. The code is as follows: (code to open port 8545) && fuser -k 8545/tcp I also tried with ...
1
vote
1answer
77 views

What do `<expire_time>` and `<retrans>` mean in the output of `ss -o`?

ss -o shows TCP timer in the following format: timer:(<timer_name>,<expire_time>,<retrans>) What do <expire_time> and <retrans> mean? I found <expire_time> ...
0
votes
0answers
37 views

Why 1 second RTO lower bound is missing in RFC 6298 Linux kernel implementation

I was going through the implementation of RFC 6298. Then i found a statement as follows. Whenever RTO is computed, if it is less than 1 second, then the RTO SHOULD be rounded up to 1 second. But ...
0
votes
0answers
217 views

Tcp TCPBacklogDrop and packets pruned from receive queue

I am analyzing two virtual machines in the same LAN, tcp packet loss problem, but the knowledge has been exhausted. platform CentOS Linux release 7.2.1511 (Core) 3.10.0-327.el7.x86_64 #1 SMP Thu Nov ...
0
votes
1answer
50 views

possible packet loss

I have a program running on my local machine that prints data to port 50000. In a terminal on my local machine I run nc to connect to and print the data on the port. However, when using nc in terminal ...
9
votes
1answer
354 views

Which Unix-like system really provides the /dev/tcp special file?

I know /dev/tcp/<host>/<port> is a magic path handled specifically by some shells in redirections. But according to man bash: If the operating system on which bash is running provides ...
0
votes
1answer
145 views

Using socat to make a secure tcp connection to an irc server

Recently, I got into irc, so I installed sic and started - obviously - chatting. But, it turns out that sic doesn't provide any security features like SSL or TCP so I in man sic, they told to use ...
0
votes
1answer
264 views

How to Disable Ping ( TCP ) in Linux all the time? [closed]

I want to disable ping response all the time. I use the following command for disable ICMP ping iptables -A INPUT -p icmp --icmp-type echo-request -j DROP what should I do for disable TCP ping ?
3
votes
1answer
81 views

What happens to a TCP connection when the network is abruptly terminated

Say a user space application has a TCP connection with some non local endpoint. At some point, network gets abruptly broken (i.e. connection deleted in network manager, unplug the wifi dongle, cut the ...
0
votes
1answer
230 views

Delay between TCP send and actual write to the NIC

While looking for solution to a problem in socket programming with python described here (In short the problem is: I want my message(~ 25 Bytes) sent by a client over a TCP socket to be dispatched(...
0
votes
2answers
94 views

port 1556 listening on tcp6 causing issues

on my RedHat 7, i noticed that network connection for Netbackup stopped working and i tried everything including rurning off my firewall and disabled SELINUX with no luck. the only thing i noticed ...
1
vote
0answers
462 views

lsof shows protocol: TCP

I ran sudo lsof -p $(pidof foo) and I got a lot of these. Does anyone know what these represent? I know they come from the process but there are no ports / IP addresses. COMMAND PID USER FD ...
1
vote
0answers
207 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
1answer
84 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
35 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
112 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 ...
4
votes
1answer
9k 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
66 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
115 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
222 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
167 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 ...
1
vote
0answers
44 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 ...
1
vote
1answer
55 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 ...
1
vote
0answers
259 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 ...
1
vote
1answer
1k 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
716 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
238 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
223 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?
-1
votes
0answers
89 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
257 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
556 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 ...