1

I'm having the same problem that's described in the following question here, however no clear answer was given.

KVM guest has a wrong outgoing ip address

My KVM host has an IP address of 185.17.xxx.34 and a virtual machine .xxx.35, however when making SSH/Telnet connections from this virtual machine the source address is showing as .xxx.34 which is causing problems with some of the programs I'm running.

I've got several other KVM servers which don't suffer from the same problem so I'm a bit confused.

Any help would be greatly appreciated!

EDIT I've answered this question below :)

Lee Brooks
  • 23
  • 3

2 Answers2

0

From what you describe it seems fair to assume that your KVM gets natted on the way out, and that the network configuration is not working as you intended.

From the KVM, please give the output of

# ip addr
# ip route

I expect you won't see the IP (...35) and gateway (...126) you provided.

Edit: As these do show the expected results, try

# ping ...126

from within the KVM, while doing

#tcpdump -i eth0 -n -c 4

on the host. Could you paste the output of the tcpdump?

Zabuzzman
  • 733
  • 10
  • 25
  • I've added the output of those 2 command to my original question. – Lee Brooks May 19 '13 at 16:05
  • Right, I've followed those instructions but am not seeing any relevant output :( I'm being shown my SSH connection to the box and that's it. – Lee Brooks May 19 '13 at 22:56
  • I do however see output if I run the tcpdump on the KVM box (although this is to be expected). – Lee Brooks May 19 '13 at 23:02
  • I think I may be a bit closer to solving this problem. I tried using eth0 and br0 as the interface flag but didn't see anything, but when I started going through the KVM virtual network adapters I got a result. Output has been added above – Lee Brooks May 19 '13 at 23:16
0

Right, so it turns out that the KVM 'default' network connection had been modified to serve our some IP addresses via it's inbuilt DHCP server, and this address happened to be in that range.

Running virsh net-edit default and changing the paramaters fixed the problem.

Thanks for all your help!

Lee Brooks
  • 23
  • 3
  • Hi, you removed all relevant technical details from your original question making it impossible to understand the actual problem and solution. The idea here is to not only solve your problem, but provide information that allows other to solve similar problems... – Zabuzzman May 20 '13 at 07:34