Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

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.

Filter by
Sorted by
Tagged with
0 votes
1 answer
17 views

Simple TCP Proxy for Amazon Linux 2

I'm looking for a simple TCP proxy that I can install and run on Amazon Linux 2. I've been using simpleproxy on Ubuntu and it does exactly what I need, but I can't seem to find an equivalent for ...
user avatar
  • 101
0 votes
1 answer
29 views

how to disable tcp_resets_received from netdata

I'm receiving TCP reset emails from netdata, how would I disable the resets from happening on my linux GCP Instance? Linux: 20.04 Provider: GCP I've tried doing this but it doesnt seem to be working. ...
user avatar
0 votes
0 answers
35 views

Which function in the Linux kernel creates the segments?

I'm working on a problem for my Master's degree and I'm trying to track down how a segment is created and how it calculates the checksum. I've located a function called tcp_sendmsg() but, even by its ...
user avatar
  • 101
0 votes
0 answers
32 views

Why doesn't MPTCP use an interface that was originally down?

I am trying to setup an MPTCP connection between 2 VMs created using Vagrant with libvirt and the AlmaLinux 8 box from Vagrant Cloud. I have 2 interfaces on each VM setup as MPTCP signal endpoints, as ...
user avatar
  • 173
0 votes
0 answers
47 views

Cant connect to my tigervnc server hosted on Ubuntu 20.04.4 LTS

Did some basic debugging. VNC session is created vncserver -list TigerVNC server sessions: X DISPLAY # RFB PORT # PROCESS ID :1 5901 4479 Port 5901 is enabled in firewall sudo ufw ...
user avatar
  • 1
0 votes
1 answer
19 views

Nmap Shows Different States of the Same Port with Different Scan Methods

When I launch an -sA scan of a certain IP address, it shows port "80" as "unfiltered". Code is below. sudo nmap -sA -vv -p 80 192.168.0.30 -Pn Host discovery disabled (-Pn). All ...
user avatar
0 votes
1 answer
58 views

Binding a utility to an ip/port [closed]

I just read in a book (from 2000) how a (unix/linux) server would listen on a port waiting for connections associated with a utility. An example in the book is about the finger utility. The netstat ...
user avatar
  • 7
0 votes
0 answers
182 views

bash script, check port response with bash's built-in /dev/tcp, time delay | hangs | speed up

With this scripts i check if a host is response on a given port with the bash's built-in /dev/tcp. I can use ip address or domains(hostnames). Script 1 #!/bin/bash HOST_NAME="127.1" ...
user avatar
0 votes
0 answers
29 views

Ubuntu 20.04 tcp ack missing seen in tcpdump capture result into half data read by application

We have application server (receiver_machine.601) receiving packets at port 601 from sender (sender_machine.123). Issue : application server is reading packets without any reassembly hence result into ...
user avatar
0 votes
1 answer
30 views

How to access port number of a TCP connection (for coding) from a kernel source code?

I am trying to write a congestion control algorithm (like TCP cubic, reno) in net/ipv4/ folder. For that, I want to use the established TCP connection port number in the code. How to get a port number ...
user avatar
1 vote
0 answers
10 views

Why does my virtualbox gateway duplicate SYN packets?

I'm trying to set up port knocking using iptables on a Debian server hosted by VirtualBox on my Ubuntu machine. For some reason, when I knock on a port on the server from the host machine, this knock ...
user avatar
  • 11
2 votes
3 answers
159 views

How to SSH to over 2000 nodes?

The first thing we're going to do is get simple information from over 2,000 servers with ssh, but I want this to be over in 30 seconds. The use of GNU Parallel and Python paramiko+multiprocessing Both ...
user avatar
0 votes
0 answers
53 views

Redirect specific traffic between two port on same device

I have two running SIP applications on a Debian buster server, one app use port 1000 (a softphone) and another one using port 2000 (VoIP server like FreePBX). both of them are on the same machine and ...
user avatar
-1 votes
1 answer
56 views

ten connections block TCP listener, how to unblock

Due to multiple CLOSE_WAITs. new connections fail when the total of existing connections and CLOSE_WAITs equals 10. Where is the 10 connection limit and how can I expand it? (having trouble finding ...
user avatar
  • 1
0 votes
0 answers
53 views

High cpu usage over TCP

I'm running haproxy 2.4 and when the haproxy is configured in tcp mode i get a high cpu usage. Example: Running the stress tool to generated arround 30k connections: ./pst -c 100000 -r 100000 -u ...
user avatar
2 votes
2 answers
379 views

Limit the duration of a TCP connection with iptables?

Is it possible to limit the maximum duration of a TCP connection with iptables? With iptables I can limit the number of concurrent TCP connections per IP address, by using -m connlimit, and I can also ...
user avatar
0 votes
0 answers
21 views

Any way to accept a tcp connection with MSS based on incoming MSS

The MSS option in TCP used to specify the largest amount of data which a device can handle, in decades ago. But in modern network, almost every device can handle large packets. Now, the MSS is mainly ...
user avatar
0 votes
1 answer
122 views

how to prevent Syn-flood on a specific port with iptables?

I was Trying Recently to prevent Syn-Flood on a server on port 2421 , only one TCP-Connection is permitted per second , and the Existing Connections should not be stopped ,so i have used the following ...
user avatar
0 votes
1 answer
58 views

Finding details of open socket

My program is leaving TCP sockets open, and I'm trying to trace the cause (I use a number of different sockets). The lsof commands shows: myprog 258981 root 56u sock 0,8 ...
user avatar
  • 1,322
3 votes
0 answers
166 views

'netcat' not working as expected on Arch, but works on openSUSE Tumbleweed? What's going on?

I'm having a bit of trouble utilising netcat on Arch, specifically, the GNU version of it. My situation: I basically made a simple server in Python that can accept multiple clients and send responses. ...
user avatar
  • 31
0 votes
1 answer
32 views

Establishing a TCP Session without terminating it (not sending RST/FIN)

I'm looking for information for a project. I'm looking for a Linux tool which can just establish a TCP session and leave at it there without sending a FIN/RST. I tried tools like iperf etc., which ...
user avatar
  • 13
0 votes
0 answers
27 views

Cannot get the full throughput from the specified TCP pacing rate

I am writing a TCP kernel module that needs pacing. Based on TCP BBR, in the kernel module, I first set the pacing status in my init function: cmpxchg(&sk->sk_pacing_status, SK_PACING_NONE, ...
user avatar
0 votes
1 answer
161 views

EHOSTUNREACH error creating a TCP connection between instances on the same EC2 subnet

I have a client EC2 instance and a server EC2 instance, both residing in the same EC2 subnet. The subnet routing table is configured so that this is a “local” route. When I run EC2 networking ...
user avatar
-1 votes
1 answer
116 views

How to intercept 3-way handshake on LAN using linux terminal without tcpdump and wireshark?

I have no root access, I have no access to any graphical software (I would love to use wireshark), and I can't install tcpdump and any other tool because of no privileges. I've been looking for some ...
user avatar
  • 1
1 vote
0 answers
35 views

Setting TCP window size on older kernel

I have this: Linux 3.10.0 #1 SMP Thu Apr 22 16:18:59 MSK 2021 x86_64 x86_64 x86_64 GNU/Linux Trying to set this in sysctl.conf net.core.wmem_max = 12874368 net.ipv4.tcp_rmem = 4096 42380 12874368 net....
user avatar
  • 11
0 votes
2 answers
665 views

What exactly happens when I enable net.ipv4.ip_forward=1?

Suppose I have this situation where I wrote a program to poison the ARP cache of 2 devices (let's say A and B), both in the local network to successfully able to MITM from device M. The program runs ...
user avatar
0 votes
0 answers
40 views

Host accepts ICMP but does not accept TCP/UDP

I'm running Mininet with a custom topology and P4 on Ubuntu 20.04. The issue happens between two hosts (h1 and h11) that are connected through a switch. The following is the configuration of the hosts:...
user avatar
  • 1
0 votes
1 answer
52 views

Understanding ACK numbers

I try to understand the reason of unordered ACK numbers. I have the following logs in wireshark: 34936 → 80 [SYN] Seq=0 Win=64240 Len=0 MSS=1460 SACK_PERM=1 TSval=3595656117 TSecr=0 WS=128 2 0....
user avatar
  • 74
0 votes
0 answers
42 views

Understand which iptables rules prevent tcp communication

I am not good at understanding iptables and hope to receive some explanation here. On a remote Linux server I have the following rules: Chain INPUT (policy ACCEPT) target prot opt source ...
user avatar
-2 votes
1 answer
50 views

How to get open connections statistics without ss or netstat

The question may sound silly but I'm trying to make a tool that uses ss data. Sadly I'm having some troubles regarding output format parsing (too much randomness depending on version and system). So, ...
user avatar
0 votes
1 answer
57 views

listener message on port 23

I want to have a message to anyone that tries to telnet (port 23) to my server that they are connecting to the wrong port, then disconnects them. Basically something like socat would be ideal, but I ...
user avatar
1 vote
1 answer
97 views

Drop the nth packet on each TCP connection, or drop all packets on connection after the nth one

I would like to test the behavior of components of my system over time if certain TCP packets are dropped, to simulate network problems. I'd like to systematically recreate issues where a connection ...
user avatar
  • 111
0 votes
1 answer
26 views

Cannot receive data while VPN is connected on separate machine

I have three linux machines, one at work (desktop 'D') and two at home (laptop 'L', raspberry pi 'R'). I want to transmit data from my work machine to one at home. The data transmission in question is ...
user avatar
  • 103
1 vote
1 answer
79 views

blocking obsolete tcp options

On Linux, I want to drop all packets that contain any obsolete tcp options. By obsolete options, I mean all those with a tcp option kind number above 8. How can I do this using nftables? For example, ...
user avatar
0 votes
0 answers
63 views

How to use xinetd to pipe over TCP into standard input of another program

Apologies if my wording is a little hard to understand -- I am fairly new to Linux. I have a program called fx2pipe on a Linux machine that communicates with a certain electronic device. The ...
user avatar
  • 101
0 votes
0 answers
105 views

How to deny traffic to and from all devices on LAN except Internet Gateway with UFW?

On a local network with range 192.168.0.0/24 and a router with fixed IP 192.168.0.1, how can you configure one specific computer (needs Internet access) to deny communication from and to all other ...
user avatar
0 votes
0 answers
39 views

tcpdump, determine transport protocol

Is there a easy way to determine the transport protocol of a packet by looking at the output of a TCP dump trace? I'd just like to be able to tell if a packet is UDP or TCP. I've tried using the -x ...
user avatar
  • 119
0 votes
0 answers
349 views

Low-level tcp/udp proxy

Is it possible to set up a server which acts as a proxy that is able to delegate all incoming traffic (regardless of protocol) to the original destination? What I am trying to do is to allow only a ...
user avatar
  • 159
0 votes
0 answers
23 views

Monitor requests from command

I wonder if there is a way to monitor which requests (TCP specifically) are made by a command when it's executed. In particular, I'm interested in which ports are involved when the command gpg --...
user avatar
0 votes
0 answers
50 views

How to set a system-level proxy independent of the desktop?

Using shell env. vars like http_proxy we can force a proxy on the programs run from that shell instance. An alternative method is setting them in /etc/environment but this needs a re-login to make the ...
user avatar
7 votes
6 answers
3k views

Linux 64-bit SSH port numbers?

While there is usually no need for more than the 64k available ports, I am interested in the PoC that having a port number on 64 bits would mitigate the regular attacks on the access ports (ssh, vpn......
user avatar
  • 602
1 vote
0 answers
54 views

Network bandwidth aggregation

Lets say I have access to two different networks: A and B. My device has two different network interfaces N1 and N2. A has a bandwidth of 5 mbps B has a bandwidth of 3 mbps I want to combine these two ...
user avatar
1 vote
1 answer
75 views

How can we trace a TCP/IP packet in a server

I'm developing a backend service. The backend contains some processes, meaning that when a client sends a request to my server, the request will go through these processes. For example, a request will ...
user avatar
  • 2,819
0 votes
1 answer
168 views

How does buffering for TCP packets work?

If I write a few times in a quick succession on a socket (with the POSIX function write), usually all the data I wrote gets sent in a single TCP packets. Unless I write too much or unless I wait too ...
user avatar
0 votes
1 answer
26 views

Ports not connecting, yet I still have Internet access

I'm currently working on a computer where I'm hosting a website as well as an SSH server. However, when connecting via SSH I receive: ssh: connect to host [ip] port 22: Connection refused In addition,...
user avatar
1 vote
1 answer
119 views

A lot of TCP retransmissions on virtual interfaces when sending large amounts of data

For some time I have strange network lags when using virtual NICs created by VPNs like ZeroTier and Hamachi, especially when sending large amounts of data. I use Ubuntu 20.04, kernel 5.4.0-67-generic. ...
user avatar
  • 11
12 votes
4 answers
2k views

Can I have a single server listen on more than 65535 ports by attaching an IPv4 address

I have a number of servers to SSH into, and some of them, being behind different NATs, may require an SSH tunnel. Right now I'm using a single VPS for that purpose. When that number reaches 65535 - ...
user avatar
  • 479
2 votes
1 answer
96 views

tcpdump: why ack number greater than sack number?

I use tcpdump to troubleshot network problem, and found one record that ack number is greater than sack number: Why ack number greater than sack number?
user avatar
  • 223
0 votes
1 answer
303 views

Which thread receives SIGURG?

I recently wrote a "study note" about Unix, and I made following proposition about multi-threaded processes: it will be almost impossible for the kernel to identify the thread that should ...
user avatar
  • 429
0 votes
0 answers
217 views

Is there a common linux command which connect to a TCP port with keep-alive enabled?

I would like to do a little test for verifying TCP keep-alive. I tried to use $ nc -l -k 9530 to listen on a 9530/tcp on server and use telnet <server IP> 9530 to create a TCP connection. ...
user avatar
  • 101

1
2 3 4 5
12