ESX Server VmWare - Disable virtual port attached to virtual switch - esx

Background:
When working on a physical network we come across a typical environment where storage boxes (NSM) are connected to switch port. We can enable or disable switch ports using putty.
Objective:
Similar fashion on ESX Server virtual machines (VM) are connected to virtual switch.Virtual switches contains Port Group to which more than 1 VM are attached.
Query:
1. Can we assign port number to VM on virtual switch ?
2. Is it possible to disable VM attached to virtual switch using port number ?
Software requirement:ESX Server / Hyper V, vSphere Client.

What you're trying to do is certainly possible.
If you right-click your VM and choose 'Edit Settings', click on the network adapter you'd like to modify and then click 'Switch to advanced settings' (blue text under 'Network Connection' section on the right), you can choose a switch and a Port ID. The port ID corresponds to the virtual switchport that you want your VM to connect to.
Using your vSphere client, go to Home->Inventory->Networking. Click on the name of your dvPortGroup (distributed port group). Next, click the 'Ports' tab near the top, middle of the screen to view all ports in your port group. Right-click the port you want to disable and select 'Edit Setting'. Under 'Miscellaneous', check the box for 'Block this port', and that will disable the specific port for you at the switch level.
Hope that helps!

Related

appache2 server on Azure VM get Error : "This site can’t be reached *.*.*.*"

i get this error for installation script that worked perfect on EC2 vm but now seems that i can't reach the site , should i add some inbound rule or something to enable apache2 server ? the error in the chrome is
This site can’t be reached *.*.*.*.com’s server IP address could not be found.
Try running Windows Network Diagnostics.
DNS_PROBE_FINISHED_NXDOMAIN
Network Security Group
Azure VMs do not have any ports open firewall ports by default unless you open them when you provision your VM. When you created your Azure VM in the Azure Portal, you likely created a Network Security Group for the VM. If you didn't specify any ports to open during the VM's creation, you'll need to open up the VM's firewall.
To Open Ports
To open up the ports on the firewall, head out to the Azure Portal (where you set up the VM). Find the VM in the list of resources. It should take you to a page for your VM where the name, status, location, size, IP address, etc will be displayed. On the left side, you'll have a vertical menu > Select Networking. From there, you'll be able to see currently active firewall rules for the VM. Since you're likely missing HTTP (80) and HTTPS, select add inbound port rule. From the dropdown for service, select HTTP and assign a name/priority. Perform the same options, except this time selecting HTTPS (443). Press save and test. You should be able to access Apache running on the VM.
Additional Troubleshooting
The script you used may have inadvertently set up the VM's iptables. You can view Linux's firewall with sudo iptables -L to verify that no firewall rules have been enabled. Since Azure handles the firewall, you shouldn't need any iptables rules, but they could always be added for additional security.
This answer assumes that you do not have Azure's Load Balancing servers installed in front of the VM.

SQL Server - How connect to Guest SQL server on Virtual Box from Host via SSMS

I want to connect to SQL server on VirtualBox VM from Host machine via SSMS and .NET code. Details are as follows
Host: Window 10 Professional
Virtual Box Ver.:5.2.8 r121009 (Qt5.6.2)
Guest: Window 7 Professional(Firewall down)
Network:
Host:Asus Router- DHCP
Guest: Currently on NAT
Each time i try to connect from Host, it fails.
SQL Configuration is as follows,
Services
Protocol
TCPIP Properties
Please help.
thank you
Dheeraj Kumar
I solved it, do below steps
Go to Virtual Box application on Host machine
Now go to settings for Virtual machine
Change Attached To: Bridged Adapter
Now this step is tricky, you may need to choose/try different option here,
select one try to run VM and see if it gets the IP address, if not choose
another and try again
Once VM gets IP, you can connect it from Host

Unable to ping from the SQL server in Azure

I have 3 VMs in Azure, one of them is DC and DNS, the other one is going to be SCCM, the ther one is SQL server.
I joined the two VMs to my DC. They have correct IP config. One of them is just fine. I can ping DC from the SSCM and vice versa.
But from the SQL server I cannot ping. nslookup does not work correctly either, but the IP config is correct.
Does any one know where is the problem?
Note: DNS server is fine. Also, I have records in DNS server that are pointing to SCCM and SQL.
Ping is disabled by default on the Windows Server VM's. Sign-in to the VM you want to ping and open the Server Manager (icon in the lower left corner).
In the upper right corner where the menu is, select Tools -> Windows Firewall with Advanced Security. Click on the Inbound Rules in the left navigation, locate the File and Printer Sharing (Echo Request - ICMPv4-In) rule. Right-click on it to enable it.
Now you should be able to ping it from other VM's in your Virtual Network.

Connect to remote Openbravo ERP Appliance

I have my Openbravo appliance running by VMWare workstation on top of Win7 which is in a LAN connected to internet by router.
When I start the appliance. I can access ERP web console by typing in the address it gave at the end of the process (for example, 192.168.1.107). All computer in the LAN can access this address as well which is fine for now.
However, in the future, I need to access this console from my home pc running Win7 (which is, of course, connected to the internet). How do i set this up?. I have try the method given in http://planet.openbravo.com/?p=8612 (see case 3 - Expose my local ERP into a remote network)
I tried (in Openbravo Appliance console running in VMWare)
ssh -R :9999:localhost:80 myhomepc#101.108.70.128
(where 101.108.70.128 is the ip of my home pc read from whatismyip.org)
but it give the following error:
ssh: connect to host 101.108.78.128 port 22: connection timed out
Do I missed any step required?
What should i do the successfully connect to my Openbravo instance?
Best is to ask those questions directly in the Openbravo ERP forums over there: http://forge.openbravo.com
The case 3 from the blog-post you are referring to makes 2 implicit assumptions.
a.) the remote computer runs an ssh-server
b.) This ssh-server can be connected to from the erp instance
One of the two assumptions seems to not hold in your case either your win7 box does not run an ssh server and/or the router of your home network does not forward port 22 from the outside to your win7 box.
Without further information i assume both items are not done.
Let me propose another solution instead. As you want to connct to the commandline of the erp appliance from home you could do the following:
Configure the router of the network with the erp appliance to connect some external port (i.e. 2222) to the ip of the appliance, destination port 22.
This will allow you to access it from the home network (or any other system from the internet knowing the ip/port).
Using an external port different from 22 some simple ssh brute-force passwords scans.
As the appliance by default does not allow login by password but only allows authentication by public-key this is secure to not allow unauthorized access to your system.
After this either use case 1 from the blog-post or an normal ssh tunnel like (ssh -p external-port user#externalipoferplan -L 9999:localhost:22' and then access the ERP via 'http://localhost' from your win7 box.
If that is too complicated and you want to just make the ERP webinterface available from the internet without having the extra ssh security in the middle then you can just configure the router of the erp lan instead to forward port 80 or 443 (http or https) to the erp-instance and access the system directly from anymore as if it would be on some public server in the internet.

How do I bind to just one IP address with VisualSVN Server?

I've installed VisualSVN on my Windows Server 2008. I have several IP addresses on this server, but I want VisualSVN to only bind to one of them. By default it binds to all available addresses. How can I make VisualSVN only handle requests on one IP address?
I tried adding
BindAddress xxx.xxx.xxx.xxx
to httpd-custom.conf and restarting the service, but that didn't seem to work.
I tried the same with httpd.conf, and it didn't work either.
To clarify, the method for binding VisualSVN to explicitly defined IP addresses is:
Load the VisualSVN Server Manager MMC snap-in
In the left pane, right-click the VisualSVN Server item and choose Properties from the context menu
Click the Network tab
In the Server Binding group, select the radio button for These IP addresses
For each IP address you want to specify:Click the Add... button
Enter the IP address in the text box and click OK
I found an easy way! I just upgraded to VisualSVN 1.6. Then, in the management console, right-click the VisualSVN Server node, select the Network tab, and enter your IP address(es). Cool!