ConfigurazioneEthernetLxcSerraX
Vai alla navigazione
Vai alla ricerca
Attach your Gentoo LXC container to Serra with 802.1X authentication
Create the ethernet interface for your LXC container (on the phisical machine)
Edit /etc/lxc/YourLxcContainerName.conf adding lines inspired to the following
## Virtual itnerface type lxc.network.type = macvlan ## Phisical ( on the phisical machine ) interface name attacched to serra lxc.network.link = eth2 ## Virtual ( on the LXC container ) interface name attacched to serra lxc.network.name = eth2 lxc.network.flags = up ## Followings 3 line depends on the machine so you MUST change them!! lxc.network.ipv4 = 131.114.186.Z/29 lxc.network.ipv4.gateway = 131.114.186.1 lxc.network.hwaddr = 26:99:38:32:f3:19
Configure the virtual interface ( on the LXC container )
Edit /etc/conf.d/net, the eth2 configuration should appear like this
# serra config_eth2=" null"
Install the 802.1X authenticaticator ( on the LXC container )
To autenticate with 802.1X you need wpa_supplicant, to install it run
emerge -avq net-wireless/wpa_supplicant
Configure wpa_supplicant ( on the LXC container )
Edit /etc/conf.d/wpa_supplicant it should appear like this
wpa_supplicant_args="-ieth2 -Dwired"
Edit /etc/wpa_supplicant/wpa_supplicant.conf it should appear like this
# IEEE 802.1X works with EAPOL version 2, but the version is defaults # to 1 because of compatibility problems with a number of wireless # access points. So we explicitly set it to version 2: eapol_version=2 # When configuring WPA-Supplicant for use on a wired network, we don?t need to # scan for wireless access points. See the wpa-supplicant documentation if # you are authenticating through 802.1x on a wireless network: ap_scan=0 network={ key_mgmt=IEEE8021X eap=PEAP phase2="auth=MSCHAPV2" identity="yourLogin" password="yourPassword" }
Make wpa_supplicast start automagically at boot ( on the LXC container )
Ad wpa_supplicant to the default runlevel running
rc-update add wpa_supplicant default