LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 12-26-2018, 04:35 PM   #1
mario21
LQ Newbie
 
Registered: Oct 2018
Posts: 3

Rep: Reputation: Disabled
Linux KVM not accessible outside LAN


Hello,
we have 2 KVM hosts (hypervisors) - on the first host (KVM 1) there is currently running Pfsense firewall, on the second host (KVM 2) there are running 2 VMs - Linux mailserver and Windows 2012 server. For accessing the LAN from outside we use OpenVPN configured on the Pfsense firewall. The situation is following - when I connect to LAN via OpenVPN, I can successfully connect/ping to PCs on LAN, I can connect to all VMs running on both hosts (on KVM 1 and 2), I can access KVM 1 host but I CANNOT access/ping KVM 2 where are installed mailserver and Windows 2012 server. When I try to ping KVM 2 host sometimes I get response but most of time not. If I try to ping or access KVM 2 directly from LAN there is no problem. As I'm new to Linux and KVM I have no idea what can be the problem. The most annoying is that ping sometimes works also via OpenVPN. Do you have any idea what should I check to resolve my problem? I did not find anything in firewall log.
Thank you very much.
 
Old 12-28-2018, 01:36 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
I will assume that the VMs are on the same LAN as the hosts. Correct me if not.

I also understand that you have connectivity to any physical and virtual machines from any physical and virtual machine. You also have connectivity to any physical and virtual machine via the VPN, except for host KVM2.

The VPN goes through the pfsense VM.

To be honest, I only have one weak idea, but would like to offer a few thoughts.

I doubt this has anything to do with KVM. You just can't reach that host, with or without KVM.
If you can occasionally reach a network device, one possible cause is another device on the same network with the same IP address.
To understand better what's going on, I would trace network traffic. I don't know what tracing options there are in pfsense. You can, however, trace the packets that leave and enter pfsense on KVM1. For that, you have to know to which network interface the pfsense VM is connected:
Code:
# virsh list
# virsh domiflist NAME_OR_NUMBER_OF_PFSENSE_VM
Interface  Type       Source     Model       MAC
-------------------------------------------------------
vnet0      bridge     br1        rtl8139     52:54:00:e0:46:6c
In the above example, the interface is vnet0. Alternatively, you can also trace the bridge, br1, but I don't know how your VMs are connected. Also note the MAC address; you will need it.

Run tcpdump on KVM1. Parameters are the interface vnet0 and the filter. Options are -n (print addresses as numbers rather than domain names), -e (print Ethernet headers), -i (interface). I don't remember the purpose of -l
Then you filter for ARP and ICMP (ping) packets where one of the parties has the above MAC address:
Code:
# tcpdump -neli vnet0 "(arp or icmp) and ether host 52:54:00:e0:46:6c"
Then ping KVM2 from outside and look at the traffic. It's particularly interesting to see the MAC address of the device that responds to the ARP. Is it KVM2? Is it something else? Is it nothing?

Not sure if this helps you solve the problem, but the investment is not too heavy I would think.

Last edited by berndbausch; 12-28-2018 at 01:38 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
KVM on Redhat 5.7: KVM can ping outside network, outside network can't ping KVM svandyk Linux - Networking 1 09-23-2011 06:45 AM
Making sshd accessible outside the LAN WhatsUnderThere Linux - Networking 5 03-17-2009 12:42 AM
Webserver not accessible outside LAN milodesc Linux - Server 3 11-28-2007 07:29 AM
how to setup vsftpd to be accessible outside my lan? dx0r515t Linux - Networking 24 03-11-2005 07:30 AM
Setting up a webserver inside a lan, which should be accessible from outside seidren Linux - Networking 2 05-18-2004 08:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 09:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration