Score:0

UFW Port Forwarding w/ Wireguard

th flag

I forgot where and how I came up with these rules, and I'm trying to clean them up. I'm trying to forward ports 24454, 24455, 4000 and 25567 in on MYSERVER to 10.5.0.3. I'm also trying to forward port 2222 in on MYSERVER to port 22 on 10.5.0.3. Below is an example of the copy-pasted tables that work for the first four ports.

:PREROUTING ACCEPT [0:0]
-A PREROUTING -d MYSERVER/32 -i eth0 -p tcp -m tcp --dport 25567 -j DNAT --to-destination 10.5.0.3:25567
-A PREROUTING -d MYSERVER/32 -i eth0 -p tcp -m tcp --dport 25567 -j DNAT --to-destination 10.5.0.3:25567
-A PREROUTING -d MYSERVER/32 -i eth0 -p tcp -m tcp --dport 25567 -j DNAT --to-destination 10.5.0.3:25567
-A PREROUTING -i eth0 -p tcp -m tcp --dport 25567 -j DNAT --to-destination 10.5.0.3
-A PREROUTING -i eth0 -p udp -m udp --dport 25567 -j DNAT --to-destination 10.5.0.3
-A POSTROUTING -o eth0 -j MASQUERADE
-A POSTROUTING -d 10.5.0.3/32 -p tcp -m tcp --dport 25567 -j SNAT --to-source 10.5.0.1
-A POSTROUTING -d 10.5.0.3/32 -p tcp -m tcp --dport 25567 -j SNAT --to-source 10.5.0.1
-A POSTROUTING -d 10.5.0.3/32 -p tcp -m tcp --dport 25567 -j SNAT --to-source 10.5.0.3
-A POSTROUTING -d 10.5.0.3/32 -o wg0 -p tcp -m tcp --dport 25567 -j SNAT --to-source 10.5.0.1
-A POSTROUTING -d 10.5.0.3/32 -o wg0 -p udp -m udp --dport 25567 -j SNAT --to-source 10.5.0.1
COMMIT```
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.