Score:0

How to forward/rewrite outgoing UDP ports?

br flag

I'd like to run a NetBios nameserver on my LAN. It needs to listen to UDP broadcasts sent to port 137 and also respond from port 137. I'd like for my program not to have to run as a privilege program in order to use this low-numbers port.

With ufw, I can successfully redirect 137-->13700

# /etc/ufw/before.rules
*nat
:PREROUTING ACCEPT [0:0]
-A PREROUTING -p udp --dport 137 -j REDIRECT --to-port 13700
COMMIT

This works to receive requests. However, my server must also respond and appear to have sent from 137, not 13700. Is it possible to configure ufw to do this routing?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.