Re: udp socket-activation "fake-service"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sa, 16.03.19 05:52, Reindl Harald (h.reindl@xxxxxxxxxxxxx) wrote:

> Hi
>
> for a firewall development setup (nested virtualization) i have running
> a tcp service like below on a VM liesting on a complete /24 network
> behind a NAT
>
>
> with "udpsvd" at least something works for "nmap -p 53 -sU -P0 host" on
> a single port and always running - is there some way to get a similar
> udp service?
>
> "ListenDatagram=53" works only without "Accept=yes" and without a
> template-serivce but even then it's finally failing
>
> goal would be listening on at least port 53 or better a ton of ports for
> udp to run port-scans and validate the fiewall ruleset without a ton of
> persistent running udpsvd-processes

I am not fully grokking what you are trying to do, but to recv UDP
dgrams you'd have to write a tiny program that calls recvfrom() (or a
similar syscall) on the sockets passed, and then replies to it with
sendto() (or a similar syscall), using the address of the source
(i.e. the struct sockaddr recvfrom() returns) to respond to the dgram.

You can easily hack that up in C or some scripting language. I am not
aware of a ready-made tool that can do that for you, in particularly
of non that is capable of doing that for more than one listening UDP
socket at a time.

Lennart

--
Lennart Poettering, Berlin
_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux