Results 1 to 1 of 1

Thread: lxd network setup

  1. #1
    Join Date
    Nov 2016
    Beans
    1

    lxd network setup

    Hi community,

    I managed getting LXD working but have troubles with the network.
    My server setup:
    eth for internet (isp)
    lan homenet
    wlan homenet
    lan and wlan are bridged to br0 (nat to eth).

    How can I access the lxd containers through br0 in the homenet and eth from outside?

    Code:
    alex@server:~$ cat /etc/network/interfaces
    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).
    
    source /etc/network/interfaces.d/*
    
    # The loopback network interface
    auto lo
    iface lo inet loopback
    
    # The primary network interface
    auto eth
    iface eth inet dhcp
    
    
    # Network bridge
    auto br0
    iface br0 inet static
        address 192.168.3.1
        network 192.168.3.0
        netmask 255.255.255.0
        broadcast 192.168.3.255
        bridge-ports lan wlan
    
    echo "1" > /proc/sys/net/ipv4/ip_forward
    echo "1" > /proc/sys/net/ipv4/ip_dynaddr
    
    # load nftable 
    up nft -f /etc/nftables.rules
    
    # hostapd und dnsmasq neu starten
    up /etc/init.d/hostapd restart
    up /etc/init.d/dnsmasq restart
    Code:
    alex@server:~$ lxc list
    +-----------+---------+---------------------+------+------------+----------------+
    |   NAME    | STATUS  |        IPV4         | IPV6 |    TYP     | SCHNAPPSCHÜSSE |
    +-----------+---------+---------------------+------+------------+----------------+
    | mediawiki | RUNNING | 192.168.3.64 (eth0) |      | PERSISTENT | 0              |
    +-----------+---------+---------------------+------+------------+----------------+
    | owncloud  | STOPPED |                     |      | PERSISTENT | 0              |
    +-----------+---------+---------------------+------+------------+----------------+
    | torrent   | RUNNING | 192.168.3.70 (eth0) |      | PERSISTENT | 0              |
    +-----------+---------+---------------------+------+------------+----------------+
    | webserver | STOPPED |                     |      | PERSISTENT | 0              |
    +-----------+---------+---------------------+------+------------+----------------+
    Last edited by alex19742; November 10th, 2016 at 07:44 PM. Reason: additional infos

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •