VPS behind NAT can't connect to it's external IP from local network [migrated] - linux

This question was migrated from Stack Overflow because it can be answered on Super User.
Migrated yesterday.
I have a VPS behind NAT with ports open using iptables.
I have a software installed on the VPS and it can't connect to its public IP. I also tried to check it with Telnet.
Output:
root#vps:~# telnet 148.x.x.x
Trying 148.x.x.x
telnet: Unable to connect to remote host: Connection refused

Related

Cant hit Node-Red web page on Vultr Machine

I have just finished setting up Node-red on the a cloud machine hosted with vultr ( Ubuntu 20.04 x64 ) and I am wanting to be able to hit the Node-Red web page but I am failing to do so.
I have setup WireGuard so I can VPN into the machine
I am able to ping the servers Local IP address from my Windows PC
But I am still unable to hit the Node-Red Web Page
Even though Node-Red is running
I am fairly new to working with cloud machines so any help would be highly appreciated.
I'm going to guess that you haven't opened port 1880 for the server.
This could be in one of 2 places
Vultr appear to have their own firewall which you will need to ensure a suitable rule to allow TCP traffice on port 1880 exists. How to configure the firewall appears to be documented here https://www.vultr.com/docs/vultr-firewall-quickstart-guide/
You will need to make sure that the port is open in the Ubuntu Firewall as well. Running sudo ufw allow 1880/tcp should do this.

how to ping the ip of linux running under vmware from window(host) of that same PC

I have window 7, and install Enterprises LINUX in vmware workstation, I have assign static IP I eth0 and eth1, and both are pinging from root as well as oracle user, but I cannot able to ping either of them from window of that same machine. Please help to advise how can i ping those static IP from my window 7 which is a host.
The answer depends on your VMWare networking setup for that virtual machine.
If the virtual machine is connected via a bridge or via a host-only network, you can just ping the VM's address.
If you're using NAT, then it's a problem since the VM has a private IP that's not seen by the host. The opposite ping should however work (if VMWare's NAT is smart enough) - you should be able to ping the host from the VM.

How to open port 9091 on a linux running under vmware?

i have on my machine windows 7.
I installed vmware player and created a virtual machine running centos.
I installed Transmission on the centos.
Now i want to access it via web, like http://111.111.111.111:9091
9091 is the port of Transmission.
This port is showing closed.
So, how can i open that port so Transmission can conect?
where do i need to open it? On windows? On linux? On router?
How i do that?
Thank you.
Your router may be configured to route packets from the public network to the local machine in the private network. It needs 9091 port to be opened and routed to the private IP.
Moreover, you need to ensure that your router can ping your centos guest before.
If it can't ping, take care of the network settings of VmWare host, AKA (bridge|nat|private|...) network mode.

Routing RDP over ssh tunnel [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I thought I could easyly find an answer here, but had no luck. Maybe it's just impossible:
Suppose the following: I am sitting at starbucks with my win 8 laptop connected to their WLAN. I open up a ssh connection to my amazon ec2 micro ubuntu instance.
Earlier in the morning before I left home, I openened up an other ssh connection to the same instance from my home win 8 machine.
Now from my putty terminal I can see both connections pts/0 and pts/1 and netstat -n gives me the ip addresses of the two firewalls (starbucks and mine) with their 10000+ port numbers as well as my ubuntu server address with port 22.
My ssh server on the ubuntu machine has TCPForwarding on.
Now how do I configure putty to tunnel rdp so I can access my home server? Do I have to do additional work on the ubuntu instance to forward the rdp packets?
win-laptop--->starbucks-firewall--->ec2-ubuntu-micro-instance<--my-firewall<--my-win-desktop
Thank you for your audience.
If your desktop and laptop were both running OS X / Linux / BSD, I'd suggest running this on your desktop:
autossh -R 127.0.0.1:3389:127.0.0.1:3389 your.ec2.instance
and this on your laptop:
ssh -L 127.0.0.1:3389:127.0.0.1:3389 your.ec2.instance
You'd then be able to open an rdp connection to localhost on your laptop, and it would be forwarded to your desktop. You shouldn't need to do any additional configuration on your ec2 instance. I'm assuming you don't have an RDP server running on your laptop.
So how do we do this using Putty? (I'm guessing slightly here.)
select the "Connection → SSH → Tunnels" category in the left hand pane
for "Source port" enter "3389"
for "Destination" enter "127.0.0.1:3389"
select "Local" (for the connection from your laptop) or "Remote" (for the connection from your desktop)
click "Add"
you will then want to save these details in the "Session" category
Ideally you will want the connection from your desktop to restart if it breaks for some reason. (If your home internet is anything like mine, it will glitch out and drop connections occasionally. But perhaps your home internet is more reliable than mine.)

ssh via putty using hostname in opensuse [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 12 years ago.
Improve this question
I am using opensuse 11.3 and it is connected to DHCP network. I am using putty to connect top machine from window with command:
putty -ssh user#ip-address (it works fine)
but when trying to connect using hostname it fails to resolve:
putty -ssh user#
Every time I want to connect to machine i need to check its ip first and then connect via putty, but when want to connect using hostname it fails and says not able to resolve. Is there a way around so that i can use a common hostname for Linux machine without worrying about its IP address which changes after every reboot?
Thanks for reply.
Regards,
Ashutosh
There are many solutions to this problem (ordered by increasing difficulty order).
Change the opensuse server interface configuration so that it takes a static address instead of relying on the DHCP server.
DHCP reserved IP address. If you also run the DHCP server, the make sure the MAC address of the opensuse adapter is always assigned the same IP address. If you're on you domestic LAN at home, then this is probably done on the Internet router. Use the http interface and navigate to the DHCP server configuration form.
In the first two cases, then you just need to update your windows host files in \windows\system32\drivers\etc\hosts to assign a name to that static address.
Configure the opensuse machine to update the DNS/WINS database upon being assigned a DHCP address.
Use a common fixed address server to synchronise a configuration file upon change of network status/address. Develop a sync client service on windows to automatically update the host file upon reception of the notification.

Resources