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.

1
vote
0answers
20 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
39 views

/dev/tcp response read works on command line, but hangs as script

I am stuck because of a puzzling behavior I cannot figure out. I am testing a (java) daemon listening on a local socket (5300): I establish a client connection via /dev/tcp on bash and expect to ...
0
votes
0answers
13 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
25 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
53 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
16 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
37 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
34 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
55 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
28 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
80 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
52 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
63 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 ...
1
vote
1answer
107 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
141 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 ...
0
votes
0answers
26 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
35 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
143 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
67 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
386 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
162 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
29 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
54 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
31 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
155 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
45 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
63 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
43 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
219 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
14 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
118 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
63 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
131 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
59 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
117 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
211 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
359 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)...
0
votes
0answers
39 views

throughput limitation of single TCP session when small RWIN does not seem to be the cause

I have a server with 10GigE NIC connected to ISP network. Bandwidth provided by ISP for this server is also 10Gbps. When I wget a 100GB file from remote server(single TCP session), then I can see the ...
1
vote
1answer
46 views

Odd internal connections

I recently noticed quite a few odd internal connections from our Apache server 79.134.108.134. The server does not have public tcp6 address. Why is the Apache server connecting from port 80 to ...
1
vote
1answer
66 views

Does AF_INET required to create socket file?

Question regarding creating the socket file for the AF_INET. For AF_UNIX talking within the same host, we create socket file example /tmp/name_of_the_socket_file How about AF_INET, does it requires ...
1
vote
1answer
189 views

Create lock using unix socket/port

Is there a way to hold a lock a unix port using netcat or some other command? I want to do something like this: set -e; nc -lock 8000 & # this needs to fail if another process holds the lock ...
0
votes
0answers
35 views

How to config tcpProxy to do that

In my case there is: Client (need to open testtt.com for example) DNS server ( configured when a client ask about testtt.com to go to a tcpProxy server 1.1.1.2 but the real ip for this website is 1.1....
1
vote
1answer
314 views

UDP or TCP hole punching to connect two peers (each one behind a router)

I'm trying to connect directly (without 3rd party server) my computer to a friend's computer. We are both behind a ISP router, and would like (as a challenge!) to connect without modifying the router ...
3
votes
1answer
282 views

Building a Unix socket bridge via TCP

I have two processes (Client and server) that communicate with each other using a Unix socket /tmp/tm.ipc. Both processes (Client and Server) don't support TCP. Client -> /tmp/tm.ipc -> Server Now, ...
0
votes
3answers
142 views

How can I send bytes to a friend's distant computer without 3rd party server?

Let's say my IP is 198.51.100.27 and my friend's IP is 203.0.113.11. We both are connected to internet behind a standard consumer ISP router. How can we send a few bytes to each other without using a ...
34
votes
1answer
5k views

Connecting to IP 0.0.0.0 succeeds. How? Why?

We are serving a port on localhost and want to check in another process if the port is available. Due to a bug in our code, it is actually trying to connect to the IP 0.0.0.0:<port>, and for ...
3
votes
1answer
771 views

How do you use “curl” to connect to a site with a non-standard protocol?

This quesiton may belong on a crypto-currency forum but I'll give it a shot here. I want to connect to a web site (mining pool) using a protocol that is not http. I've read the protocol is "stratum+...
2
votes
1answer
3k views

How to properly configure a tun/tap Interface in linux?

Basically I am trying to create a custom TCP Stack. As you might know I cant use eth0 because linux kernel TCP stack uses that, Due to that I need to create a tun/tap interface and use it for my ...
4
votes
2answers
3k views

How to tell how much memory TCP buffers are actually using?

I've got a front end machine with about 1k persistent, very low-bandwidth TCP connections. It's a bit memory constrained so I'm trying to figure out where a few hundred MBs are going. TCP buffers ...