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.
634 questions
0
votes
0
answers
64
views
Issue with SSH connection in Mac
I'm trying to ssh to a remote server. But after the ssh is successful the connection freezes within 2-3 minutes and eventually drops.
On checking packet trace i observed my mac is randomly sending a ...
2
votes
1
answer
400
views
TCP checksum offloading on virtio-net paravirtualized interfaces
Consider the topology where 2 QEMU VMs running Linux Ubuntu 16.04 kernel version 4.4.0-210 have both virtio-net interfaces with TAP backends connected to the same (host) Linux bridge and an SSH ...
2
votes
1
answer
42
views
DTrace cannot reference the external kernel variable `ticks` on FreeBSD
I've come across the following DTrace one-liner on https://wiki.freebsd.org/DTrace/One-Liners:
# Summarize TCP life span in seconds:
dtrace -n 'fbt::tcp_close:entry {
@["TCP life span (...
0
votes
1
answer
55
views
Checking if service is running, Service is installed already
So basically i installed an Automation Anywhere product in Amazon Linux 2, when i checked the
netstat -tulnp | grep LISTEN
i didn't found the Listener that's supposed to be there exist. Thus leading ...
3
votes
1
answer
623
views
Why is `ss --kill` so slow?
I've measured ss --tcp --numeric --no-header --kill dst 1.2.3.0/24 on various machines (all running Ubuntu Server 22 or 24 LTS) and it consistently needs around 7-10ms to complete. Any idea where the ...
0
votes
0
answers
41
views
Parallelization of TCP Stack in embedded Linux
I have a ARM Cortex-A9 dual-core processor running with 800MHz. An yocto based embedded Linux with kernel 5.15 (will be updated to 6.6 soon) is executed on the ARM processor.
When I transfer data ...
0
votes
1
answer
198
views
Netstat -an command output TCP [::]:135 [::]:0 LISTENING
In my InfoSec course assignment, we were given the task to analyze the different communications that were displayed when we run the command netstat -an. While analyzing I saw the following ...
0
votes
1
answer
798
views
Bitwise constructs to match TCP flags in nftables
I can't find any documentation that would explain the syntax and evaluation of the following sample constructs:
add rule filter output tcp flags & (syn | ack) == syn | ack
add rule filter output ...
0
votes
1
answer
139
views
How can I have multiple TCP clients connected to server ttyS0?
I'm trying to test following envirorment:
One server (it's a router, It has busybox and few other cmd) with a a physical serial port and and open socket
#tcpsvd -v 0.0.0.0 -p 999 cat /dev/ttyS0
...
0
votes
0
answers
351
views
How to Log Each Outbound TCP Connection
At my company we have a set of 3 identical VMs. These VMs house an app that "sends messages". The app sends each message by making a TCP connection out to one of two fixed IP addresses (...
0
votes
0
answers
114
views
Why receiving TCP network packets require more memory bandwidth and CPU utilization than transmitting packets?
I am analyzing an ARM system with Linux kernel 5.15 running. I am running iperf3 to measure the network throughput between two ARM systems.
Note that these are simulated systems and are loosely ...
1
vote
0
answers
262
views
TCP out-of-order and GRO feature with linux kernel 5.14
according to the RFC9293, the PSH flag will be set in the last TCP segment created from the buffer (Ref. https://datatracker.ietf.org/doc/html/rfc9293#name-send).
I'm in a scenario where the traffic ...
0
votes
1
answer
506
views
stdin redirection from /dev/tcp/localhost/port
I'm trying to get my head around some TCP-related topics, and have been experimenting:
The following works fine:
Process A: nc -l 12345 | wc -c
Process B: </dev/random head -c 1k > /dev/tcp/...
0
votes
0
answers
119
views
ARM-LINUX-GCC with LIBMODBUS
Hi everyone, I'm trying to compile a program using "arm-linux-gcc" with "libmodbus";
however it seems the compiler is not set up for libmodbus.
What should I do to fix it?
4
votes
0
answers
770
views
Linux reuse of ports after TCP RST
I have a set up where I do a lot of HTTPS connections to customers, and under high load some connections time out. After digging a bit I found that it happens when we or the server (same behavior in ...
1
vote
1
answer
852
views
Prevent port scanning on OpenWRT
Imagine you need to have open ports on your Internet router but you don't want them to be easily discovered or enumerated.
How can you prevent hackers/companies from scanning your open ports?
2
votes
1
answer
153
views
Ubuntu server, packets from outside network not reaching local socket but seen on tcpdump
I am running Ubuntu server 22.04, and have a peculiar port forwarding issue with a local machine. This machine has two Ethernet interfaces and the connected enp1s0 interface has an IP address 192.168....
1
vote
0
answers
368
views
How to see all tcp ports listened on locally
I have a WSL2 instance with Ubuntu 22.04. I have installed microk8s and enabled the local registry. The local Registry in microk8s listens on node port 32000. I can access this registry in WSL on both ...
0
votes
2
answers
226
views
Does Linux TCP stack processing happen before or after netfilter?
The Linux netfilter has multiple hooks at different OSI model layers according to this image. However, the transportation layer protocols like TCP requires additional processing like retransmission ...
0
votes
1
answer
2k
views
How to measure TCP latency?
OS is Debian on both servers.
I found some examples showing how to measure TCP latency with nmap:
nmap --packet-trace -p 22 192.168.0.10
But I'm getting some negative results for latency. ie, it will ...
1
vote
1
answer
754
views
What is header-data split and why it's needed for TCP_ZEROCOPY_RECEIVE page alignment?
I'm currently investigating about TCP_ZEROCOPY_RECEIVE and I read that it requires header-data split support of NIC.
As far as I understand, this feature is to DMA the header (IP, TCP headers) and ...
0
votes
1
answer
665
views
How to force TCP window scaling using SSH?
Inter continent data transfer's speed is maximum 2MB/s.
I checked and the SSH server of my server doesn't even use window scaling, and the window itself is very small, around 22KB...
Flags [S], seq ...
0
votes
1
answer
614
views
What's the differnce between "Connection timed out" v/s "No route to host" for ncat command?
I tried to use ncat command to 2 diff unknown IPs from a CENTOS 7 (linux) terminal.
[abc@localhost ~]$ ncat -zv 10.11.78.5 22
Ncat: Version 7.50 ( https://nmap.org/ncat )
Ncat: No route to host.
[abc@...
0
votes
2
answers
173
views
Script to execute a task when certain TCP traffic appears (Raspberry Pi OS Bookworm)
I am using a Raspberry Pi as a Wifi bridge in my kitchen at home to bring network connectivity to a device that only has ethernet.
I used a Will Haley guide and it works great. That part is solved ...
0
votes
1
answer
687
views
Do bind mounts from NFS path create additional connections to the underlying NFS server?
I am designing the following setup:
NFSv3 server
Centos7 Client
The client mounts an NFS share from the server to /mnt/nfs_share
Now I want to create many read only bind mounts from that mount to ...
4
votes
4
answers
2k
views
Ist it possible to check the peer address before accepting a TCP connection?
I wrote a simple Perl server that listens on a TCP port/socket, accepting connections.
Now I wonder:
When wanting to implement address-based access control, is it possible to check the address of the ...
1
vote
0
answers
96
views
sysctl prameters seem not working on a VM
I am trying to tune my servers performance. To do so, I wanted to test some sysctl prameters such as net.core.somaxconn, net.ipv4.tcp_max_syn_backlog and net.core.netdev_max_backlog.
Following were my ...
4
votes
0
answers
560
views
TCP/IP Network in Ubuntu 22.04 Becomes Unresponsive After Heavy Network Load from MPI Program
I have two identical servers running Ubuntu 22.04.3 LTS. Both systems have 2x AMD 9654 CPUs with 192 total cores and 512 GB of RAM. Each server has two 10G ethernet ports built into the motherboard. ...
0
votes
0
answers
126
views
simulate differente Src IP (spoofing) for testing geoip filtering
I would like to simulate different ips for testing traffic filtering according to the ip origin.
I did some tests using iptables and 2 containers simulating node1 and node2 using a bridge network.
...
1
vote
0
answers
191
views
Anyone know of a TCP-based tunnel protocol linux will support?
I have a lossy (1%) 10gig link between geographic locations which supports legacy systems that have non-tuneable TCP stacks. They have horrible throughput across the link because their TCP stacks ...
0
votes
1
answer
95
views
Question on encrypted DNS over Quic? How is it encrypted?
Suppose,I am using DNS over Quic. Since it is an encrypted protocol as it claims. My question is if intermediate servers cannot see my dns query, how will my dns query be resolved?
It says that the ...
0
votes
0
answers
155
views
Established but hidden TCP connection
On computer 10.196.111.161, I can see the following established tcp connection:
[10.196.111.161]# netstat -natp | grep 7000
Proto Recv-Q Send-Q Local Address Foreign Address State ...
0
votes
2
answers
1k
views
socat et al.: run a command when incoming connection is received
Let's say one is listening on a tcp port for an incoming connection using socat like this:
$ socat file:`tty`,echo=1 "TCP-L:8080"
Is is possible to run a command (just once) when connection ...
0
votes
1
answer
148
views
Why does netstat show my socket tutorial program having a port of "x11-1" instead of the port I set in code?
I am trying to learn about socket programming, and I have the following function to set up a socket:
29 int CreatePassiveSock(char *protocol, char *portstr, int qlen) {
30 ...
0
votes
1
answer
1k
views
conditional flush tcp sockets on linux
whenever I write data to a tcp socket, it waits until its filled with enough data ex: 64k (max packet size) then it sends data to the wire.
this misses the data at the right time for the other end.
...
0
votes
0
answers
98
views
How can I redirect traffic for a specific user to connect to another server?
what I intend to do is transfer the traffic of just a specific user to another server (IP). with the commands below it will work very well to transfer only the traffic from the entire server, which ...
0
votes
1
answer
458
views
How to clean TCP Established state sockets?
I'm experiencing an issue with my rented VDS server, which is running Ubuntu 22.04. To secure my server, I have enabled ufw (Uncomplicated Firewall) and allowed access only to two TCP ports: 2222 for ...
0
votes
0
answers
48
views
Problem with connection between custom application and qpidd compiled on ArchLinux while running them on Debian
I have a custom application and qpidd (Qpid version 1.36) which had been built on ArchLinux. Default TCP with default settings is used as protocol to connect to the running qpidd, and the connection ...
0
votes
0
answers
495
views
Problem using Iptables for filtering traffic on a network interface which is a bridge port, on a specific tcp port
I am using iptables as firewall to filter traffic. I want to block traffic on a network interface on a certain tcp port (I'm testing on port 22). The network interface is a bridge port, so I'm using ...
0
votes
0
answers
235
views
TCP connect() call to device on local network very slow
I am running a local DHCP server using isc-dhcp-server on Debian linux, address 10.0.0.1.
I have a relay on 10.0.0.99, to which a pulse is sent every 4 seconds or so via an HTTP request.
The pseudo-...
1
vote
0
answers
493
views
TCP/IP client-server slow communication
I made some network application.
It is a client-server solution using the TCP/IP protocol.
Clients connect to the server.
They make several connections every second.
Communication consists of units of ...
1
vote
0
answers
1k
views
prometheus node exporter sockstat
I'm looking for the meaning of the node_sockstat_TCP_mem_* metrics.
The output of the node exporter describes them as follows:
# HELP node_sockstat_TCP_mem Number of TCP sockets in state mem.
# TYPE ...
0
votes
0
answers
284
views
How does sshuttle actually forward TCP packets? How is it different from a full-fledged VPN?
Here is the scenario:
On myHost (1.1.1.1) I run:
sshuttle -r user@remoteHost 0/0
Now, if I check the my current IP on myHost with an http request directed to one of those services that echo your IP, ...
0
votes
1
answer
145
views
TCP port visible from inside nor outside
I've used autossh (reverse) connecting to my server. The ssh side works like used to. But in an ARM64 system, my Ubuntu has less possibilities but this is another story (...).
So what I see whit nmap ...
0
votes
1
answer
426
views
Unable to send more than 60 bytes TCP packets using traceroute or tcptraceroute
[root@host33cn ~]# traceroute -M tcp -f 255 -m 255 -q 10 -w 1 -p 9101 10.11.1.6 1400
traceroute to 10.11.1.6 (10.11.1.6), 255 hops max, 60 byte packets
255 host05cn.zen.com (10.11.1.6) 0.112 ms 0....
0
votes
0
answers
431
views
How to build kernel after modifying specific files?
I'm new in kernel development and I modified two kernel files for a research project. Now, I already know how to do a fresh building of the kernel source code and that is what I did. I'm asking if I ...
0
votes
1
answer
664
views
NFS client (ubuntu) froze after a while with openbsd server / FIN_WAIT_2
I have an openbsd server sharing directories through NFS protocol. After I installed a new version of ubuntu on the client, I still mount NFS directories however after a (random) time: nautilus, ls ...
0
votes
1
answer
330
views
why is proxied TCP traffic much faster than routed/VPNed TCP traffic
I have a VPS which can download a file from Server X at 2gbps.
I have a home internet connection which can download a file from the VPS at 1gbps, but from Server X at only 100mbps.
If I use a SOCKS ...
1
vote
1
answer
955
views
Applying patch file to ubuntu server
Can someone please explain how to apply a patch file to ubuntu server kernel? I'm trying to apply this patch file which enables the tcp_collapse_max_bytes option in the TCP communication options on an ...
1
vote
0
answers
394
views
Unable to read data from gpsfake
I saved the following NMEA-messages to the file messages.txt:
$GPRMC,131131.00,A,5956.4298,N,03015.4464,E,00.00,310.5,130123,,,D*53
$GPRMC,131132.00,A,5956.4298,N,03015.4464,E,00.01,097.3,130123,,,D*...