New on LowEndTalk? Please Register and read our Community Rules.
Port Forwarding

in General
hallo, i need some help about port forwarding
i have
vps ubuntu 18 64 bit
ip vps 103.253.27.165
ip local vpn 10.255.255.34
port 7575
i want forward to my router
ip router 192.168.17.1
port 8282
what is the command should i type on my server to forward port 7575 to 8282
Comments
You need a vpn connection between the server and home to keep the client's IP.
yes vpn already running > @miHoYo said:
yes, vpn already running sir
Do you need to tunnel protocols other than TCP? Because if not you can just use SSH Remote Port Forwarding.
Anyhoo, this should be pretty straightforward considering you already have the VPN set up, take a look at this.
Sorry I'm struggling to follow.... you have a vpn and a vps and then there is an ip address at your house (lan ip 192.x.x.x) port forwarding from your internal lan to the Internet is easy and you can change the external port so internal can be 7575 and external can be 8282
Unless that's not what your trying to achieve
on ubuntu box
iptables -t nat -A PREROUTING -p tcp -m tcp -i ens33 --dport 7575 -j DNAT --to-destination 10.255.255.35:8282
will packet oging to your home..
uhm.. i don't know your home's vpn ip
what is differrent your ways with mr t0ny0's ?
you don't need Masquerade line because it's source nat.