Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have installed kvm on my ubuntu pc.
I have created 3 VMs, two on the 192.168.122.0 network and one on the 192.168.100.0 network.
When a packet comes from 192.168.100.190 (outside.example.org) and goes to the 192.168.122.0/24 network.
The 2 VMs (server.example.com and client.example.com) see it as coming from 192.168.122.1 and NOT from 192.168.100.190 as expected !!
Examples:
- When I run a ping command from 192.168.100.190 (outside.example.org) the output of the tcpdump command on 192.168.100.103 shows this:
# tcpdump -i eth0 -v icmp
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
14:40:57.249450 IP (tos 0x0, ttl 63, id 0, offset 0, flags [DF], proto ICMP (1), length 84) 192.168.122.1 > server.example.com: ICMP echo request, id 13, seq 1, length 64
- When I send an http client request (elinks browser) from 192.168.100.190 to the httpd server on 192.168.100.103 the logs file on this shows :
192.168.122.1 - that would be the ip of kvm host,right? Or is it some other router configured here?
It sounds to me as NAT is being used. If you don't want that between your 192.168.122.1 private networks you'll have to configure the device with ip 192.168.122.1 .
Now I don't quite understand you.
You are using NAT, you have obviously set it up yourself. But you don't want NAT? Well then remove those rules.
Maybe you don't really know what NAT is:
When NAT is used on a router/firewall, it takes the actual incoming IP and translates it to it's own.
That's how you can use private ip's on your server and still have it reachable from internet.
So, your NAT rules will replace the senders ip with routers ip. That's why you get 192.168.122.1 in the logs.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.