1

I have a VPS with a static public IP, and I also have a home network with a static public IP.

I want to somehow make it so that if the VPS's static IP receives traffic on a certain port, it routes/redirects/forwards all that traffic to my home networks static IP, possibly to a different port if need be, but likely to the same port.

My VPS is running Ubuntu 18, Im just not sure what to install/set up on it... is this an iptables thing? Or some other utility?

Matthew
  • 343
  • 1
  • 2
  • 11
  • Yes that would involve doing NAT, usually using iptables. To have this working transparently requires a tunnel and a lot of really complex configuration, especially at home. Instead, a "double NAT", would work but then home will only see the VPS' IP and won't be able anymore to tell apart intrusion attempts from legitimate access. Better then use a proxy, because the proxy knows the protocol and can add informations (eg a http proxy can add X-Forwarded-For) thus allowing source's identification. So you should add in the question what is the "real life" use case behind this. – A.B May 19 '18 at 13:39
  • The application is Im running a bunch of crypto masternodes on my home machines and I need to have multiple static IPs (since the masternodes need a unique IP for each one), but I only have one static IP available at home. So I am purchasing a bunch of small VPS services with their own static IPs, which each masternode will point to, and I want to forward all that traffic from the VPSs to my single home networks static IP – Matthew May 19 '18 at 13:54
  • you should use "edit" and add a (shorter) information in the question. I'm leaving pointers for you to choose, not answering. your question would require more concrete informations on what you already tried, and it appears nothing was attempted yet. keep this "[Asking](https://superuser.com/help/how-to-ask)" in mind. also you should have mentioned the [previous related question](https://superuser.com/questions/1323215/how-to-setup-vps-to-forward-multiple-ips-to-a-single-static-ip) about this. so those nodes probably don't require internet access (beside thru the VPS) that's a simplification – A.B May 19 '18 at 14:52
  • A task for ssh tunnels. – marc Nov 08 '20 at 12:22

0 Answers0