Skip to content

Instantly share code, notes, and snippets.

@AzimsTech
Last active January 31, 2023 19:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AzimsTech/c623c907715bcd1659cfd9c4af9fe84e to your computer and use it in GitHub Desktop.
Save AzimsTech/c623c907715bcd1659cfd9c4af9fe84e to your computer and use it in GitHub Desktop.
Setup using LuCI

Setup Using LuCI Web Interface

Download OpenWrt Firmware

Open https://openwrt.org/toh/d-link/dir-842#installation and select Firmware Install. At this step we need to download factory version.

Flash OpenWrt Firmware

  1. Connect to D-Link router through Ethernet cable.
  2. Power off the router
  3. Hold on the reset key and restart the router, release the reset key until you see the LED starts blinking.
  4. On the computer, manually assign a static IP address on the 192.168.0.xxx subnet, other than 192.168.0.1 (e.g. 192.168.0.2)
  5. Open a web browser and navigate to http://192.168.0.1
  6. Choose the firmware file you have downloaded previously and click on Upload.
  7. After the file has been uploaded, you should see a Device is upgrading the firmware message on the web browse
  8. The device will reboot automatically after the flashing process finishes

Configuration through OpenWrt LuCI web interface

  • Change to DHCP mode after the router is restarted
  • The gateway by default is https://192.168.1.1 without password
  • System
    • Administration
      • change router admin password
      • modify interface of SSH access to LAN
      • SSH Keys
        • past the content of your public key file. It will be a long string starting with ssh-rsa …
    • Network > Wireless > 2.4G AP & 5G AP > Device Configuration
      • Advance Settings
        • Country code: modify country code
    • Interface Configuration
      • General Setup: modify ESSID
      • Wireless Security:
        • Encryption: WPA2-PSK
        • Cipher: Force CCMP
        • Key: Your Wi-Fi Password
      • Advanced Settings
        • uncheck Disassociate On Low Acknowledgement
        • check Disable Inactivity Polling
        • Time interval for rekeying GTK: 3600
  • Network > Wireless > 5G AP > Device Configuration
    • Operating frequency:
      • Mode: AC
      • Channel: 36
      • Width: 80mhz
  • Network > Wireless: Save & Apply
  • Network > LAN: modify gateway to 192.168.0.1 if 192.168.1.1 has conflict with upstream
  • Network > LAN: Save & Apply
  • Network > Firewall > General Settings
    1. Routing/NAT Offloading
      • check Software flow offloading
      • check Hardware flow offloading
    2. Save & Apply

Configure PPPoE

  1. Network > Interfaces > Devices: Add device configuration
    1. Select VLAN (802.1q) as device type
    2. Select eth0 as base device
    3. Introduce 500 in VLAN ID 500 (This configuration depends on the operator)
    4. uncheck “Enable IPv6
    5. Save
    6. Save & Apply
  2. Network > Interfaces > Interface: click edit on WAN configuration
    1. Change protocol to PPPoE
    2. Select Software VLAN eth0.500 as device
    3. Introduce PPPoE username and password
    4. Save
    5. Save & Apply
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment