Showing posts with label openwrt. Show all posts
Showing posts with label openwrt. Show all posts

Monday, January 18, 2021

OpenWrt on HP Microserver Gen8

This was done when the server already had a working debian in its own partition. Can be done also in a new/empty disk using a live install disk.
menuentry 'OpenWrt 19.07.5 (on /dev/sdc2)' --class openwrt --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-57f8f4bc-abf4-655f-bf67-946fc0f9f25b' {
    insmod part_msdos
    insmod ext2
    set root='hd2,msdos2'
    if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd2,msdos2 --hint-efi=hd2,msdos2 --hint-baremetal=ahci2,msdos2  57f8f4bc-abf4-655f-bf67-946fc0f9f25b
    else
        search --no-floppy --fs-uuid --set=root 57f8f4bc-abf4-655f-bf67-946fc0f9f25b
    fi
    linux /boot/vmlinuz root=/dev/sdc2
}
  • Update-grub
  • Boot
  • opkg install /tmp/kmod-libphy... and opkg install /tmp/kmod-tg3
  • Configure as needed
  • Once you have internet connection consider install additional packages (e.g. nano, luci-admin-full).


Tuesday, January 14, 2014

OpenWRT: opening ports to the WAN (aka NAT, aka port forwarding)

Opening a port to a LAN computer is simple, you can do it from the GUI:
# Port 22422 -> 10.0.0.109:22422
config redirect
        option target 'DNAT'
        option src 'wan'
        option dest 'lan'
        option src_dport '22422'
        option dest_ip '10.0.0.109'
        option dest_port '22422'
        option proto 'tcp'
        option name 'Allow-SSH-bob' 
Opening a port to your router is not so simple:
# Port 64430 -> 10.0.0.1:443
config redirect
        option src 'wan'
        option proto 'tcp'
        option src_dport '64430'
        option dest_ip '10.0.0.1'
        option dest_port '443'
        option name 'Allow-HTTPS-router-redirect'

config rule
        option src 'wan'
        option proto 'tcp'
        option dest_port '443'
        option target 'ACCEPT'
        option name 'Allow-HTTPS-router-rule' 
Source:
http://www.smallbusinesstech.net/more-complicated-instructions/openwrt/setting-up-port-forwarding-and-dealing-with-loopbacks-on-openwrt-kamikaze-8.09.1