Score:0

How To Forward Port to Different Port to an External IP using UFW Firewall

pw flag

I have an VPN server on Server B port 442

before I Forwarded a different Port to my Server B using firewalld and worked nice , now I want to migrate to UFW for some reasons,

I tried before.rules with

*nat
:PREROUTING ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
-A PREROUTING -i eth0 -p tcp --dport 448 -j DNAT --to-destination {Server-B_IP}:443
-A POSTROUTING -s 192.168.1.0/24 -o eth0 -j MASQUERADE
COMMIT

and I allowed Forward-Policy

and some other method like ufw route allow in eth0 ... etc..

all submitted succesfully but my client data can't redirect from "Client to >> "Server-A" with UFW to >> VPN "Server-B"

I did it before using this command on "Server-A" with firewalld but now I want to do this with UFW !

firewall-cmd --permanent --add-forward-port=port=4430:proto=udp:toaddr={Server_B}:toport=4433

Can anyone Suggest me a method to do this with UFW ? Thanks In Advance with <3

I sit in a Tesla and translated this thread with Ai:

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.