简体   繁体   中英

FIWARE: How to access to instance without “public instance”?

two instances:

1.- Orion with 192.168.x.1, public like 130.abc 2.- Keystone with 192.168.x.2. Port 8000 opened and tested from localhost 3.- instances have the same routing rule group.

I edit my security group rules adding port 8000 with a cidr 192.168.x.2/32. Now i test it with telnet from my computer:

telnet 130.abc 8000

result: Connection time out.

i'm wrong? how can i connect to port 8000 from my computer to my second instance using the public Ip (configured in first instance) ? Or need a second public Ip?

There are many ways to do this: IPForwarding with iptables, haproxy, etc.

However, I thinK that the easiest way to do this would be SSH Port forwarding in your host with the public IP:

ssh -f -N -o ServerAliveInterval=30 -L 0:8000:192.168.x.2:8000 $YOUR_USER@192.168.x.1:8000
  • -L 0:8000:192.168.x.2:8000 means that It'll listen every network interface (0:8000) and will send every query to 192.168.x.2:8000
  • If you don't have a password to your user or ssh is not configured to accept passwords, you could consider either adding a new authorized key (so you can locally login) or connecting your public IP using -A so your credentials can be forwarded: *
     ssh -A -i $PRIVATE_KEY_FILE $YOUR_USER@130.abc  

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM