installing Openwrt on xcp-ng



  • I have a small PC that I was using as a pfsense router/firewall. I wanted to add WIFI capability to the unit. I tested openwrt on the current hardware and it worked. Now, I virtualized the pfsense (working) and I would like to add the openwrt. There are instruction on how to install openwrt on Xen https://openwrt.org/docs/guide-user/virtualization/xen and I though this may work on xcp-ng but I need some help.

    • I am not sure where to place the domain configuration file Xen-OpenWrt.conf

    • I am assuming the network configuration is done at the xcp-ng terminal, right?

    brctl addbr owrt-lan
    ip link set owrt-lan up
    ip addr add 192.168.1.42/24 dev owrt-lan
    
    brctl addbr owrt-wan
    ip link set dev eth0 up
    brctl addif owrt-wan eth0
    ip link set owrt-wan up
    
    • Where to find the Xen domain configuration file?

    Please note I have no IT background but I love tinkering. Thanks in advance for your help and input.

    Untitled_1_odg.png



  • @moussa854

    as I look at it this can all be done with the user interface of xcp-ng (xoa or xcp-ng center).
    first create a network connected to a physical nic and use that as wan for openwrt
    then create en internal network (or use another nic) and use that as lan for openwrt.

    create a new vm for openwrt (import the virtual disk of openwrt) connected both networks created above.

    ps what is the use of openwrt when you already have pfsense?
    both are basically routers



  • first create a network connected to a physical nic and use that as wan for openwrt
    then create en internal network (or use another nic) and use that as lan for openwrt.

    @HeMaN Thank you for the tip. Just to make sure I understand correctly. I already have WAN and LAN networks for each NIC. But for some reason only the LAN is recognized by the Openwrt and I can not connect to the internet when I am on the LAN. I think it is a network issue this is why I decided to just follow the guide.

    ps what is the use of openwrt when you already have pfsense?
    both are basically routers
    I love pfsense but the OS but the WIFI support lags behind. I am planning to use openwrt for WIFI access.

    windows_10__Running_.png



  • @moussa854
    how have you configured the network for your vm?

    since you already have pfsense wan with a private ip I would think you connect the wan side of the vm to the same wan network (also getting an ip handed out by your providers router?)
    lan side you de not want on the same lan network as pfsense, so a separate network connected to your wifi points?



  • how have you configured the network for your vm?

    @HeMaN I set everything to go through pfsense. Hence, the openwrt VM WAN is connected to static IP from pfsense 192.168.30.12. The openwrt VM LAN is 192.168.20.1/24.



  • Is OpenWRT's wan assigned to xcp-ng's NIC1/Lan ?

    Do you have more than 2 physical NIC's or is OpenWRT's lan assigned to NIC0?



  • I am back to the office and I am troubleshooting different settings and connection setups. I appreciate all your input. The issue is configuring the right NIC0/NIC1/WAN/ and LAN. Once I am done I post my setting. Thanks again for everyone.


Log in to reply
 

XCP-ng Pro Support

XCP-ng Pro Support