Virtual Bridge & Shorewall Question

Andrei Verovski (aka MacGuru)
Mon, 03 Sep 2007 20:01:14 -0000

Hi,

I am in the process of conteinerization of server infrastructure, and my idea
is to run telephony server appliance Trixbox under KVM (which in tuen uses
QEMU codebase) on SuSE Linux.

KVM networking is rather primitive, and the only way to make KVM''ed OS
seen
as "normal" computer is to use virtual bridge as I found on net.

The questions are (based on the http://www.shorewall.net/bridge.html):

1) What should be included in /etc/shorewall/interfaces
and /etc/shorewall/hosts - "br0" or "qtap0",
"qtap1", etc?

2) Why the author of this script used "$USERID" in "tunctl -b -u
$USERID -t
qtap$i"? If the user is non-root, may it somehow affect Shorewall bridging
setup?

------------------------------

# id of the user running qemu (kvm)
USERID=1000

# number of TUN/TAP devices to setup
NUM_OF_DEVICES=5

case $1 in
        start)
                modprobe tun
                echo -n "Setting up bridge device br0"
                brctl addbr br0
                ifconfig br0 192.168.100.254 netmask 255.255.255.0 up
                for ((i=0; i < NUM_OF_DEVICES ; i++)); do
                        echo -n "Setting up "
                        tunctl -b -u $USERID -t qtap$i
                        brctl addif br0 qtap$i
                        ifconfig qtap$i up 0.0.0.0 promisc
                done
        ;;
        stop)

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/