User Datagram Protocol (UDP) is defined to make available a datagram mode of packet-switched computer communication in the environment of an interconnected set of computer networks. This protocol assumes that the Internet Protocol (IP) is used as the underlying protocol.
Questions tagged [udp]
210 questions
64
votes
4 answers
How does netcat know if a UDP port is open?
So I can use this netcat command to check if a UDP port is open:
$ nc -vz -u 10.1.0.100 53
Connection to 10.1.0.100 53 port [udp/domain] succeeded!
Unlike TCP, UDP is connectionless (fire and forget). So at a high level does anyone know how netcat…
Patrick McMahon
- 790
- 1
- 5
- 9
39
votes
1 answer
Is it better to set -j REJECT or -j DROP in iptables?
There's an example of iptables rules on archlinux wiki:
# Generated by iptables-save v1.4.18 on Sun Mar 17 14:21:12 2013
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
:TCP - [0:0]
:UDP - [0:0]
-A INPUT -m conntrack --ctstate…
Mikhail Morfikov
- 10,309
- 19
- 69
- 104
35
votes
3 answers
How do I reserve ports for my application?
How do I reserve a list of ports for my custom applications?
To be specific, the product I'm creating has a lot of processes and a lot of intercommunication between them.
The problem I'm having is that - every once in a while - the OS steals my…
Michael Baker
- 453
- 1
- 4
- 4
26
votes
2 answers
Are /dev/{udp,tcp} standardized or available everywhere?
I've recently learned about the /dev/udp and /dev/tcp pseudo-devices here. Are they specific to some GNU/Linux distributions or can I find them on other unix systems?
Are they standardized in some way?
So far, I've been able to use them successfuly…
Antoine
- 1,021
- 1
- 12
- 13
16
votes
1 answer
Why is my TCP throughput much greater than UDP throughput?
I haven't done anything unusual to my hardware or kernel configurations (all default settings, fresh OS install, Linux kernel 3.11 TCP/IP stack) and I'm averaging about 3.83 million messages per second through TCP while I'm only averaging 0.75…
elleciel
- 465
- 2
- 5
- 12
15
votes
3 answers
How do I create a UDP packet?
When I perform the following Netcat command and view the packets with Wireshark, it says the UDP packet is malformed.
$ echo "this is a test" | nc -u 127.0.0.1 53
Similarly, using commands like $ echo "this is a test" > /dev/udp/127.0.0.1/53…
user322500
- 151
- 1
- 4
15
votes
2 answers
Redirect stdin and stdout to ports
I'd like to take a program P that reads from stdin & writes to stdout, but connect it to nc or whatever such that it reads from a certain port and outputs to another port.
# The reading is easy, here P reads from port 50505
nc -l 50505 | P
How do I…
Yimin Rong
- 913
- 2
- 9
- 23
13
votes
4 answers
Multicast UDP not working
Multicast UDP on raspberry pi
I haven't narrowed things down enough to know if my issue is because of debian, raspbian specifically, or if I am just missing a something completely.
I have a python application that uses multicast UDP to let other…
Alex
- 133
- 1
- 1
- 5
11
votes
1 answer
why ss(8) understands listening UDP ports differently than netstat(8)?
If I execute ss -lu in order to view all the listening UDP sockets, then none of the sockets are displayed. If I execute ss -au, which lists all(both listening and non-listening) UDP sockets, then "listening" sockets are displayed as UNCONN (see…
Martin
- 7,284
- 40
- 125
- 208
9
votes
3 answers
Cannot see packets arrive on application socket that were seen by Wireshark
Using Ubuntu 14
I have a Linux machine where there are two interfaces:
eth1: 172.16.20.1
ppp0: 192.168.0.2
ppp0 is connected to a device which has a PPP interface (192.168.0.1) and a WAN interface (172.16.20.2). I can verify that this device can…
nnja
- 99
- 1
- 4
9
votes
4 answers
How to listen to all ports (UDP and TCP) or make them all appear open in Debian
I got an external Debian server. The problem is that my university campus doesn't allow connections to go outside when the port is different than TCP port 22, 80, 443, or UDP port 123. I tested them manually. On my Debian server I would like to…
Michael
- 93
- 1
- 1
- 5
8
votes
2 answers
What does 0.0.0.0:* mean in netstat?
Could anyone explain the following output of netstat -plunt?
udp 0 0 0.0.0.0:58262 0.0.0.0:* 1163/avahi-daemon:
udp 0 0 0.0.0.0:17500 0.0.0.0:* 3779/dropbox:u
udp 0 0 0.0.0.0:5353 …
user55986
- 83
- 1
- 1
- 3
7
votes
1 answer
Create UDP to TCP bridge with socat/netcat to relay control commands for vlc media-player
The UDP - must listen on port.
The TCP - must connect to a server.
I tried netcat and socat.
nc -v -u -l -p 3333 | nc -v 127.0.0.1 50000
socat -v UDP-LISTEN:3333,fork TCP:localhost:50000
Both work -- they delivered the message -- but the line is…
Mihai Popescu
- 95
- 1
- 1
- 5
7
votes
1 answer
How can I redirect all UDP traffic from one port to another on BSD / OS X?
On Mac OS X 10.9.5 I am running boot2docker and would like to temporarily forward a non-privileged UDP port 69 to port 69 of the boot2docker virtual machine. Virtualbox only supports forwarding privileged ports.
I've tried running socat like…
cwd
- 44,479
- 71
- 146
- 167
7
votes
2 answers
Start a service on a network request (socket activation)
I have a program that under normal activation listens on some port.
I don't want the program running continuously.
Is there a "quick and dirty" way to wrap the application in a shell script or similar that will monitor the appropriate port, and…
user50849
- 5,082
- 5
- 25
- 30