66 votes
Accepted

nginx: [emerg] "stream" directive is not allowed here

stream needs to be on the same level as http block so like http { foo } stream { bar } My guess is your include for /etc/nginx/conf.d/*.conf is located in the http {} block and not outside of it. ...
Mike's user avatar
  • 22.5k
40 votes
Accepted

Why would a university block incoming UDP traffic with destination port 53?

The logic works like this: Only authoritative DNS servers that provide records to the internet are required to be exposed. Open recursive servers that are exposed to the internet will inevitably be ...
Andrew B's user avatar
  • 33.1k
40 votes
Accepted

Do DNS queries always travel over UDP?

Normal DNS queries use UDP port 53, but longer queries (> 512 octets) will receive a 'truncated' reply, that results in a TCP 53 conversation to facilitate sending/receiving the entire query. Also, ...
George Erhard's user avatar
30 votes

Do DNS queries always travel over UDP?

This started as a comment to George's answer, but it got long. The larger picture is somewhat complicated, as it requires understanding some history. RFC 1035 originally called for a limit of 512 ...
Andrew B's user avatar
  • 33.1k
24 votes

Why would a university block incoming UDP traffic with destination port 53?

For example, attackers could use university's DNS server as transit host for DNS Amplification DDoS Attack
user1700494's user avatar
  • 1,662
14 votes

Does HTTPS use TCP or UDP?

Nowadays HTTPS can run above either TCP or UDP. The new "QUIC" protocol aims to replace multiple TCP connections with one multiplexed UDP connection, and hence can handle SSL and HTTPS: HTTPS &...
J.P. Tosoni's user avatar
14 votes

How is the MTU is 65535 in UDP but ethernet does not allow frame size more than 1500 bytes

UDP doesn't know anything about MTU. UDP packets can have any size from 8 to 65535 bytes. The protocol layers below UDP either can send a packet of a specific size or will reject to send that packet ...
Mecki's user avatar
  • 919
12 votes

Listen to UDP data on local port with netcat

For some reason, Andrew's solution didn't work for me. With further research, I learned that we need to add -p flag when working locally. So the following command worked for me. nc -ulp 2115
Sheshank Kodam's user avatar
12 votes

How to determine which process is sending UDP packets once per hour?

You can easily accomplish this with SysInternals' Process Monitor. Run it as Administrator, then configure it as follows: On the Filter menu click Filter... In the first drop down box, select ...
I say Reinstate Monica's user avatar
11 votes

Why would a university block incoming UDP traffic with destination port 53?

Andrew B's answer is excellent. What he said. To answer the question "What undesirable things could happen if incoming UDP packets to port number 53 weren't blocked?" more specifically, I googled "...
Katherine Villyard's user avatar
11 votes

Are DNS queries encrypted?

DNS, by default and when created, does not offer neither authenticity (being sure you get a response from the true authoritative nameserver of the zone) nor confidentiality (making sure no one on the ...
Patrick Mevzek's user avatar
10 votes
Accepted

How to start iperf3 server in UDP mode?

The syntax is a bit different for iperf3. Example 1Mbps udp test: server side: iperf3 --server client side: iperf3 --udp --client client.ip.address --bitrate 1M What I find really interesting is the ...
hank's user avatar
  • 116
9 votes
Accepted

UDP hole punching still required in IPv6, even without NAT?

Before answering the questions, I'd like to address some of the assumptions in it. The firewalling properties of NAT were also beneficial for security. This is often-repeated, but simply not true; ...
MadHatter's user avatar
  • 80.6k
9 votes
Accepted

How to block 111 udp port via iptables?

Depending on how nice you want to be to the client, a possible solution can be: iptables -I INPUT -p udp --dport 111 -j DROP or iptables -I INPUT -p udp --dport 111 -j REJECT
kofemann's user avatar
  • 4,886
8 votes

Testing UDP port connectivity

You can scan udp ports by using following command nmap -sU -v <hostname or ip>
Koray Güclü's user avatar
7 votes
Accepted

php-fpm php_network_getaddresses calls randomly start failing with bad udp cksum

You have a defective security fix installed -- this sounds like the issue from USN-3239-2. A security update for GNU libc that addressed (among other things)... an unbounded stack allocation in ...
Michael - sqlbot's user avatar
7 votes
Accepted

netdata ipv4 UDP errors

netdata uses statsd as the metrics collection system. This is a UDP based protocol which is incredibly fast and efficient, but at high rates can overflow the recv_buffer of the ingress node. The ...
Brennen Smith's user avatar
7 votes
Accepted

Are DNS queries encrypted?

Standard DNS is not encrypted anywhere. DNSSEC has cryptographically signed (but still not encrypted) responses. There have been some non-standard ideas and implementations over the years, but nothing ...
theultramage's user avatar
6 votes

Linux Kernel not passing through multicast UDP packets

TL/DR Also make sure your multicast doesn't come from a vlan. tcpdump -e would help determine if they do. In all fairness, somebody ought to build a page with a checklist of things that can prevent ...
Pawel Veselov's user avatar
6 votes

Do DNS queries always travel over UDP?

There is RFC 7766, DNS Transport over TCP - Implementation Requirements. Introduction Most DNS [RFC1034] transactions take place over UDP [RFC768]. TCP [RFC793] is always used for full zone ...
Ron Maupin's user avatar
  • 3,273
6 votes
Accepted

Is a DDoS possible if the port being attacked is closed?

Yes. Packets destined for your host will still be routed to your machine and your machine still has to process those requests. Even if the 'port is closed', the Kernel/Network Stack still have to ...
Andrew's user avatar
  • 2,172
5 votes
Accepted

UDP Server behind Gcloud load balancer: receive ok, reply fails

I had to deal with a similar issue for one of my udnergraduate projects: load balancing DNS. https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Load_Balancer_Administration/...
Daniel Widrick's user avatar
5 votes

How to set the UDP Packet Size with iperf3?

-l is the suitable option for or UDP packet size in iperf3 not -M (which is MSS for TCP)
Jimmy88's user avatar
  • 341
5 votes

OpenVPN Server PacketLoss

You need to set correct MTU for your VPN link. You can determine the value with ping command. Start pinging server from client with ping -M do -s 1500 -c 1 10.8.0.1 It will probably say ping: local ...
Anubioz's user avatar
  • 3,725
5 votes

UDP Sessions and Ephemeral Port Selection

According to https://www.cymru.com/jtk/misc/ephemeralports.html the selection strategy varies between random and sequential depending on OS. Based on my observations, it the source port for UDP is ...
David Filiatrault's user avatar
5 votes

What are TCP Port 5445 and UDP Port 3935 used for on Windows Server 2016?

5445 TCP is SMB Over DMA: https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?=&skey=6&page=135 3935 UDP is used by SDP Port Mapper Protocol: https://...
Swisstone's user avatar
  • 6,890
5 votes
Accepted

Why is my computer making unreachable ICMP requests to the gateway?

These are no ICMP requests. Instead they are the reaction to something done by your router: based on the information you show your router (192.168.0.4) was sending a UDP packet with source port 53 to ...
Steffen Ullrich's user avatar
5 votes

Why udp has lower throughput than tcp?

TCP includes congestion control. It will limit traffic to prevent packet loss. UDP just sends all of the packets you request and hopes for the best. https://www.geeksforgeeks.org/tcp-congestion-...
stark's user avatar
  • 369
4 votes

How can I identify which processes are generating UDP traffic on Linux?

Be aware that when using autitctl, nscd for example uses a slightly different parameter in the socket system call, when doing a DNS query: socket(AF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) So to ...
Silverfibre's user avatar
4 votes
Accepted

rx_queue value in /proc/net/udp grows to twice the SO_RCVBUF value

From the socket(7) man page: SO_RCVBUF Sets or gets the maximum socket receive buffer in bytes. The kernel doubles this value (to allow space for bookkeeping ...
Moises Silva's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible