How to take Firewall Name in SSHLibrary for doing open connection to do VM login - firewall

To login my VM through robot framework, I require Host name, port, username, password and firewall name. I am done with other things except firewall name. Can someone please assist how to take firewall name in open connection function inside SSHLibrary.

Related

Loosing access to Windows VM through RDP/Bastion soon after connecting to a Client VPN using Cisco-VPN-Client

I'm trying to use a Windows VM deployed through AVD to connect to a client VPN. And client's VPN is restricted in a way that it only allows users to access few of their internal servers but nothing else. So, I'm loosing access to VM soon after connecting to the Client VPN using Cisco-Mobile-VPN client. And it looks like VPN is restricting external connectivity to the VM. As a new user to Azure, I'm trying know if there is a possible work around to access the VM even after connecting to client restricted VPN. Any help is much appreciated.
Please follow the below procedure to fix the issue:
Go to the “Network and Sharing Center”
Click on “Change Adapter Settings”
Click on your VPN entry and then “Change settings of this connection” in the ribbon.
Drill into IP v4 properties and to the IP Settings tab. (as the above picture shows)
Uncheck “Use default gateway on remote network”.
If you are still facing the issue or unable to uncheck “Use default gateway on remote network”, please check if he vpn provider can add you to a group that has a policy set for 'split tunneling' - this is done on the vpn host side.
Please refer below URL for more information :
https://serverfault.com/questions/193308/vpn-within-a-remote-desktop-session?rq=1

Cannot connect to PuTTY and WinSCP

I have created a new EC2 instance and installed ftop on it. I am able to access it through PuTTY and WinSCP. Suddenly, once when I try to open through WinSCP, it is giving an error as:
The server rejected SFTP connection, but it listens for FTP
connections. Did you want to use FTP protocol instead of SFTP?
Prefer using encryption.
And through PuTTY it is showing as "CONNECTION REFUSED". I even tried restarting the instance. What is the problem?
If you want to access your Linux EC2 server instance via PuTTY or WinSCP, and you find that you can no longer successfully establish a connection to it, you can do the following in your EC2 AWS Console:
Go to the left panel of your EC2 AWS Console, Network & Security → Security Groups → *<your security group name>
In the Inbound tab, click "Edit".
Go to column "Type", row "SSH".
Go to column "Source" of row "SSH", click the "Custom" dropdown field.
Select "My IP" → Doing this should automatically update your present public IP address setting in AWS.
Take note that your public IP address may change from time to time, depending on your ISP (Internet service provider).
Having said this, whenever it does change, you should be able to resolve this issue by redoing steps 1 - 5.
Make sure the FTP ports that you are trying to access on the machine are enabled by the inbound security group rules.
This answer should help you out further inbound security group.
Also double check to make sure your EC2 machine doesn't have a firewall that may be blocking connections that are allowed by your inbound security policy.
it might be SSH service interrupted. Try to change permissions in the home directory. If the .ssh/ folder permissions changed, you can not connect to the instance. You can try shutdown and then start instead of restart.
If it is not working, please create AMI image of that server, and then try to launch a new instance from that image. Definitely it will work.

Azure VM Remote Desktop Can't Connect

Following a how-to book's guide on setting up a VM through the Azure Portal and getting the error when trying to connect
Remote Desktop can't connect to the remote computer for one of these reasons: 1) Remote access to the service is not enabled 2) The remote computer is turned off [Verified through the Azure Portal it is turned on because Start is faded, while Restart and Stop are not] 3) The remote computer is not available on the network.
The error occurs before I'm able to enter any credentials - it doesn't find the IP at all. The RDP file details (IP removed of course):
full address:s:[IPAddress]:3389
prompt for credentials:i:1
administrative session:i:1
What I've tried:
Even though the How-To book doesn't show where/how to specify a port, when I download the RDP file from the Connect option, it specifies the port 3389. The book seems to imply that simply downloading this file and connecting will work and there's no need to specify the port. I get the above error.
Flushed DNS on my computer, ipconfig /flushdns
In the Network Security Group option for the VM, I verified that port 3389 allowed any source and wasn't specific.
I did miss associating the subnet part of the Network Security Group to a virtual network, so I did associate my NSG with the default subnet set up for my Virtual Network.
From the Quick start option, I don't see how to connect to this either; I'm guessing, I need to specify a different port, but don't see where to do it here either => Update: this appears to be in the Network Security Group's Inbound security rules in the Azure portal.
Boot Diagnostics option shows the login screen. A ping to the IP address fails four times with "Request timed out."
Note: this is not a Virtual Machine (classic).
just wanted to share what worked for me.
After receiving an error prompt:
Connect is disabled for this virtual machine because of the following
issues: Network interface 'vmwindows1094': Network security group
'VMWindows10-nsg' does not have inbound security rule that allows port
3389. VMWindows10-nsg
I have added an inbound port rule. Under VM > Settings > Add inbound port rules.
Port: 3389 Protocol/Source/Destination: Any (this can be configured based on your security rules) Action: Allow
On the Azure portal, Select your VM -> Settings -> Boot diagnostics. Make sure that you can see the login screen. You might need to enable diagnostics (under Monitoring section) if not enabled already.
If you don't see the login screen, trying the 'Redeploy' option under 'Support and Troubleshooting' section of settings.
If you can see that the machines has booted correctly, the connectivity issue might be because of a firewall at your end or on the VM. See if you can ping the machine. If you are behind a corporate firewall, try connecting from elsewhere and check your PC's firewall.
Creating a new Virtual Machine on the new portal now creates a NSG (Network Security Group) along with the VM. You should be able to find it under all resources, same name as you VM. Make sure that there is an Inbound rule configured for Remote desktop (it is created by default but might be worth checking).
I had the same problem but adding an inbound security rule was not sufficient (although it is also needed).
I had to go to virtual machines > (myVm) > Reset password and then choose Reset configuration only
Try checking your VM has enough memory.
I had tried all of above suggestions and still didn't manage to access.
After trying many times I managed to get in a message appeared saying:
Your Computer is low on memory
Not 100% sure that was the reason though.
I faced the same issue. I had created an Azure VM but wasn't able to connect to it using RDP.
The culprit was a default "Inbound Port Rule" due to which all the inbound traffic was being blocked.
The solution is to create a new rule by clicking the "Add Inbound Port Rule" and allow traffic from port 3389. Make sure that the priority of this new rule is greater than the "DenyAllInBound" rule otherwise our new rule will not have any effect.
After adding the rule, try connecting to the VM using its public IP in RDP and you should be able to connect.
This worked for me, hope it helps you as well.

Azure Point to Site port 445

I've setup Azure point to site and I'm able to connect from my computer to an Azure VM (file share). I'm also able to ping my computer IP address from the Azure VM. However, I'm not able to connect to any resource on my local computer. When trying to access a file share on my computer from the Azure VM I get the following error:
file and print sharing resource (169.254.108.240) is online but isn't responding to connection attempts.
The remote computer isn’t responding to connections on port 445, possibly due to firewall or security policy settings, or because it might be temporarily unavailable. Windows couldn’t find any problems with the firewall on your computer.
Port 445 is enabled on my local computer:
netsh firewall set portopening TCP 445 ENABLE
As an additional test If I issue a \169.254.108.240 from my local computer point to itself it works fine. The same try from the Azure VM gives me the error above.
Thanks,
Your IP address (169.254.*) is a non-routable address. You'll need to get a valid IP (say with DHCP, or set manually) and allow connections to your machine. If you have a firewall, this means adding a NAT rule to it.
If possible, try making the connection from another computer on your LAN to isolate any other firewall/Azure issues.
I think you have to consider several concepts while implementing azure network, first try to put point to site network on a different range of IPs (like 10.4.0.0) then try to disable firewall on your computer and try again, if you have proper routing device it should go through and get the feedback form the local machine.

how to grant remote access for mysql database from another network?

I am using MAMP, on a Mac. I have granted access to all ip addresses using:
GRANT ALL PRIVILEGES ON database.* to ‘%' IDENTIFIED BY 'somepassword';
FLUSH PRIVILEGES;
My team members need to access this database from their homes, meaning they are not on the same network as I am. I researched how to make a test connection using msql workbench, but that means they have to have it on their computers too, no? Also, if my database path is obviously on my computer, what would the host info be on their new connection setup?
I assume that your Mac is sitting at your home behind a router.
The first thing you should do, is open/forward the port(s) that are required to access mysql in your router. The default should be 3306. So any request that comes to your router on this port goes to your Mac. Check your routers manual for this.
Then your colleagues need your current IP (http://whatismyipaddress.com/).
With the IP and port they should be able to create a connection to the mysql server on your Mac.
Once you get this working you can look into the topic of "dynamic dns", to account for changes of you home IP address.

Resources