Score:0

IP routing beween local pc and GCP VM using zerotier interface to access application

cf flag

I am running application on 192.168.196.199:8080 on local PC. This application is accessible inside GCP VM using Zerotier interface i.e:

curl 192.168.196.199:8080

Generates Some Response

GCP VM has following interface IPs:

Zerotier: 192.168.196.82

Internal IP: 10.128.0.11

Gateway: 10.128.0.1

I want application to be accessible through 10.128.0.11:8080. I tried googling and most of them were related to iptables. I tried following, but it failed to achieve my goal:

sudo iptables -t nat -A PREROUTING -p tcp -d 10.128.0.11 --dport 8080 -j DNAT --to-destination 192.168.196.199:8080
sudo iptables -t nat -A POSTROUTING -p tcp -d 192.168.196.199 --dport 8080 -j SNAT --to-source 10.128.0.11:8080

Please help me out here, I'm stuck. Thanks. Network Demonstration Here

tladuke avatar
cn flag
Is ip forwarding enabled on the vm?
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.