From: Phil Daws <uxbod@splatnix.net>
To: kvm@vger.kernel.org
Subject: Virtual Firewall
Date: Thu, 14 Mar 2013 14:53:43 +0000 (GMT) [thread overview]
Message-ID: <2015645203.231170.1363272823347.JavaMail.root@innovot.com> (raw)
In-Reply-To: <1746047153.230756.1363271967103.JavaMail.root@innovot.com>
Hello,
have been trying to build a virtual firewall as a POC but having some difficulty with the networking aspect. On the physical server I have a single NIC that is connected to the Internet with the IP XXX.XXX.XXX.10 and is bound to bridge0. I created the first guest, as the firewall, and added a virtio interface with source type "Host device vnet (bridge0)". At the guest OS level I assigned the NIC another public IP XXX.XXX.XXX.20 and was able to route quite happily to the Internet. I then proceeded to add a second NIC to the firewall guest but this time using the default NAT network and gave it the address 192.168.1.1. I then created another guest with the IP 192.168.1.2 with its default route being 192.168.1.1 and that could get out to the Internet as-well once the FORWARD+SNAT rules w
ere added to iptables.
Now here in lies the problem. I wish to add another network so that I end up with:
XXX.XXX.XXX.20 Public Facing
192.168.1.1 Private LAN
192.168.2.1 DMZ
So using virtual-manager I created two brand new networks called "PrivateLAN" and "DMZ" with the networks above. I then removed the secondary interface from the firewall and added two new NICs, one being on the PrivateLAN and the other on the DMZ. When I fired up the firewall and attempted to assign those IP addresses to the interfaces the response was:
[root@fw1 ~]# ifup eth1
Error, some other host already uses address 192.168.1.1.
[root@fw1 ~]# ifup eth2
Error, some other host already uses address 192.168.2.1.
Running an arping showed that the MAC for bridge0 already had those IPs registered ?!?!? I am obviously missing a networking fundamental here and really would like some help.
If you have only one physical NIC how do you create multiple networks as above; that allows IPtables to control the traffic flow.
Any help gratefully appreciated.
Thanks.
next parent reply other threads:[~2013-03-14 15:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1746047153.230756.1363271967103.JavaMail.root@innovot.com>
2013-03-14 14:53 ` Phil Daws [this message]
2013-03-14 15:30 ` Virtual Firewall Andrew Cathrow
2013-03-14 15:52 ` Phil Daws
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2015645203.231170.1363272823347.JavaMail.root@innovot.com \
--to=uxbod@splatnix.net \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.