What's new

Port forwarding to VPN Client

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Jonnny

Occasional Visitor
Hello everybody,

I have a doubt in forwarding the traffic of a software port with destination to a VPN Client (sorry for the noob question).

I found these commands, but I wanted to know if it's the right/safe thing to do.

Code:
iptables -t nat -A PREROUTING -i INTERFACE -p udp --dport PORT -j DNAT --to-destination IP_ADDRESS
iptables -t nat -A PREROUTING -i INTERFACE -p tcp --dport PORT -j DNAT --to-destination IP_ADDRESS

INTERFACE = tun13 (eg. interface 3 of OpenVPN Client)
PORT = 3440 (eg. port defined in software)
IP_ADDRESS = 192.168.1.10 (eg. IP of device where installed the software)

If this port is already defined in the GUI (WAN --> Virtual Server / Port Forwarding), it would be better to remove it, correct?

Finally, if the Killswitch option is enable on the VPN Client, will traffic be blocked if the VPN connection fails?

1686092068315-png.50748


Thanks.
 

Attachments

  • 1686092068315.png
    1686092068315.png
    10.9 KB · Views: 215

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top