0

i'm moving from windows to debian 10, and on windows i'm using portproxy to re-route a port

netsh interface portproxy add v4tov4 listenport=9800 listenaddress=127.0.0.1 connectport=9078 connectaddress=127.0.0.1

I now need to do the above with debian/nftables What config would i need to do the above port remap on nftables?

Quade
  • 1
  • 1
  • 2
    People who know nftables do not need to know `netsh`. Please state what you want to achieve without assuming people must know `netsh`. Thx. – Jiri B Apr 04 '21 at 10:09
  • I recommend to use `firewalld`, it's simple tool and it could do things you want. BTW, firewalld is not other firewall, it's just frontend to backends (iptables, nftables,...). – Jiri B Apr 04 '21 at 10:12
  • sorry, i just need to forward one port as it comes into server, to another local port – Quade Apr 04 '21 at 11:03

1 Answers1

0

This is called Port forwarding and as explained in the RHEL's documentation, https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/security_guide/sec-configuring_port_forwarding_using_nftables

nft add rule ip nat prerouting tcp dport 9800 redirect to :9078 

You can find good documentations on other distribution's website, especially RHEL. You don't need to stick with Debian's.

Alexis
  • 172
  • 1
  • 12