Getting Started OpenWrt
The OpenWrt Project is a Linux operating system targeting embedded devices. Instead of trying to create a single, static firmware, OpenWrt provides a fully writable filesystem with package management. This frees you from the application selection and configuration provided by the vendor and allows you to customize the device through the use of packages to suit any application.
OpenWrt official Website Here .
In this article, I will talk about:
- Compile Openwrt from Source Code.
- Install Openwrt on ProxMox.
- Basic Set-Up for Openwrt.
Make sure your have a avaiable Linux/MacOS system, offers recommand Ubuntu 18 LTS x64.
Install required packages.
1 2 3
sudo apt-get update sudo apt-get -y install build-essential asciidoc binutils bzip2 curl gawk gettext git libncurses5-dev libz-dev patch python3.5 python2.7 unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib p7zip p7zip-full msmtp libssl-dev texinfo libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint device-tree-compiler g++-multilib antlr3 gperf
Getting Source Code and enter direction.
git clone -b main --single-branch https://github.com/Lienol/openwrt openwrt cd openwrt
Add additional package/plugin to Source Code, such as Passwall.
Adding src-git at the end of file.
src-git passwall https://github.com/xiaorouji/openwrt-passwall
Update the feeds
1 2 3
./scripts/feeds clean ./scripts/feeds update -a ./scripts/feeds install -a
Configure the firmware image
First three menu is very inportance, Please, carefully choose with your correct CPU architecture. For example, x86.
Settings your package/plugins luci-app, such as, luci-app-passwall
Downloading DL library.
make -j8 download v=s
make -j1 V=s
NOTE: -j1 is followed by the number of threads. Single thread is recommended for the first compilation.
Output path after compilation. openwrt/bin/targets
Firstly, Upload your compiled IMG File to ProxMox
sftp into ProxMox.
List local directory.
sftp> lls openwrt-x86-64-generic-squashfs-combined.img.gz
List remote directory.
sftp> ls ROSinstall.sh interfaces temp
Secondly, ssh into ProxMox and using the below Script create a new VM.
Set Lan IP Address, Gateway and DNS
network -> interface -> edit
Content need to set-up:
- General Settings:
IPv4 IP Address: 192.168.1.252 IPv4 gateway: 192.168.1.253 IPv4 bradcast: 192.168.1.0
- Advantages Settings:
DNS set as public DNS Server: 126.96.36.199, 114,114,115,115
If this Openwrt as your bypass router, please follow at the below settings. LAN Settings: Let lede only be used as a pure bypass route, DHCP and IPv6 are both allocated by the main route.
- DHCP Server -> General Settings -> choose Ignore this interface.
- IPv6 Settings -> RA Service - Disable
- IPv6 Settings -> DHCPv6 Service - Disable
Let lede obtain IPv6 information normally.
add new interface -> name: IPv6; Protocol: DHCPv6 Client Device: @lan -> create interface -> Firewall settings: lan -> create interface.