Make secure Iot gateway with LibreCMC and TP-LINK-wdr4300 - Part 1

Written by David on 18 may 10:50 GMT.


Tp-Link 4300 specification:


Instruction set: MIPS MIPS 74Kc
Vendor: Qualcomm Atheros
Bootloader:U-Boot
System-On-Chip:AR9344 (MIPS)
CPU/Speed560 MHz
Flash-Chip:Spansion FL064KIF
Flash size:8192 KiB
RAM:128 MiB
Wireless No1: SoC-integrated: Atheros AR9340 2x2 MIMO for 2.4GHz 802.11b/g/n
Wireless No2: separate Chip: Atheros AR9580 3x3 MIMO for 5GHz 802.11a/n
SwitchAtheros AR8327N
USB: Yes 2 x 2.0 (GL850G chip - 4 ports capable)
Serial:Yes
JTAGYes

1. Preparing System to build LibreCMC from trunk (Ubuntu/Debian GNU/Linux)

1.1#>_ apt-get install kernel-package flex gawk wget unzip ncurses-base libncurses5-dev libghc-zlib-dev libssl-dev patch perl subversion git-core fossil
1.2#>_ fossil clone https://librecmc.org/librecmc librecmc.fossil
1.3#>_ fossil open librecmc.fossil
1.4#>_ cd trunk
1.5#>_ ls








2. Configuring System

2.1#>_ make menuconfig

Select ->

Subtarget (luci) --->

Target profile (....TP-LINK 4300) --->

3. Removing IPv6 (If you are using IPv6 you can skip this step)

Go to ->

Global build Settings --->

Remove [ ]Enable IPv6 support in packages

Go to ->

Network --->

Select [M] odhcpd and odhcp6c

Go to ->

Kernel modules > Network Support ->

Make shure kmod-ipv6 is {M}kmod-ipv6 selected ->

3. Optional modules

Go to ->

Kernel modules > Cryptographic API modules ->

Select ->

[*] kmod-crypto-rng

Go to ->

Network > VPN ->

Select ->

[*] openvpn-openssl or polarssl

Go to ->

Utilites > Editors ->

Select ->

[*] nano

Go to ->

Network > SSH ->

Select ->

[*] openssh-client

[*] openssh-server

[*] openssh-sftp-server

So we are ready to build exit and save configuration

4. Building image

4.1#>_ make

4.2#>_ cd bin/ar71xx/

If building is ok File ready to be flashed is librecmc-ar71xx-luci-tl-wdr4300-v1-squashfs-factory.bin

Here is our new LibreCMC secure IOT gateway!