Hirdetés

Új hozzászólás Aktív témák

  • chros

    őstag

    válasz chros #19480 üzenetére

    Cudy WR3000 (mediatek/filogic, aarch64_cortex-a53 dual-core 1.3 GHz CPU, 16 MB flash, 256 MB RAM)

    Elkeszult, igy egy kis osszegzes, hogy miket allitottam be, masoknak jo lehet a jovoben.

    1. OpenWrt 23.05.2 felrakasa: kovesd ezt a howto-t

    2. sajat build keszitese:
    - miutan nincs USB es csak 16MB flash van 256 MB RAM-al, es hardveres offload mellett nem mukodnek a bandwidth monitoring appok (sqm, vnstat es tarsai), igy eleg keves extra csomag az alap melle:
    bridger coreutils-sleep htop ip-full kmod-nf-nathelper kmod-nf-nathelper-extra mt7981-wo-firmware mc mc-skins netcat tcpdump tmux wget luci-ssl luci-app-ddns luci-app-wol luci-proto-relay luci-proto-wireguard
    - bridger es mt7981-wo-firmware csomagok WED-hez es WiFi hardver offload-hoz kellenek

    3. config reszletek:
    - /etc/modules.conf WED miatt:
    options mt7915e wed_enable=Y
    - /etc/sysctl.conf:
    net.netfilter.nf_conntrack_helper = 1
    - /etc/config/system ledek miatt:
    config led 'led_wan'
    option name 'wan'
    option sysfs 'blue:internet'
    option trigger 'netdev'
    option dev 'pppoe-wan'
    list mode 'link'
    list mode 'tx'
    list mode 'rx'

    config led
    option name 'lan'
    option sysfs 'blue:lan'
    option trigger 'netdev'
    option dev 'br-lan'
    list mode 'link'
    list mode 'tx'
    list mode 'rx'

    - /etc/config/wireless 2.4 Ghz:
    config wifi-device 'radio0'
    option type 'mac80211'
    option path 'platform/18000000.wifi'
    option channel '13'
    option band '2g'
    option htmode 'HE40'
    option cell_density '0'
    option txpower '17'
    option country 'HU'
    option noscan '1'

    - /etc/config/dhcp caching DNS server:
    config dnsmasq
    option domainneeded '1'
    option localise_queries '1'
    option rebind_protection '1'
    option rebind_localhost '1'
    option local '/lan/'
    option domain 'lan'
    option expandhosts '1'
    option cachesize '1000'
    option authoritative '1'
    option readethers '1'
    option leasefile '/tmp/dhcp.leases'
    option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
    option nonwildcard '0'
    option localservice '1'
    option ednspacket_max '1232'

    config dhcp 'lan'
    option interface 'lan'
    option start '100'
    option limit '150'
    option leasetime '12h'
    option dhcpv4 'server'
    option dhcpv6 'server'
    option ra 'server'
    list ra_flags 'managed-config'
    list ra_flags 'other-config'
    list dhcp_option '3,192.168.1.1'
    list dhcp_option '6,192.168.1.1'

    4. egyeb beallitasok:
    - guest WiFi
    - adblock-lean: dnsmasq-al blocklist memoriaban (default config-gal)
    - es par script cron-bol wget-et vagy netcat-et hasznal (belso eszkozok automatizalasara)

    5. SSH-n eleres KiTTY-vel:
    - KiTTY-n belul a terminal type string: xterm-256color
    - /etc/tmux.conf:
    # Rebind to Ctrl-a
    set -g prefix C-a
    unbind C-b
    # Allows us to use C-a a <command> to send commands to a TMUX session inside another TMUX session
    bind a send-prefix
    bind C-a last-window
    bind '"' choose-window

    # Rebind pane splitting C-a - , C-a _
    unbind %
    bind - split-window -v
    bind _ split-window -h

    # Bind Power detach and logout to C-a C-d
    bind C-d detach -P

    # C-a D : get a list all sessions with their current dimension and choose which client you want to detach from the session

    # Rebind r to force a reload of the config file: C-a r
    unbind r
    bind r source-file ~/.tmux.conf

    # Set status bar
    set -g status-bg colour236
    set -g status-fg white
    set -g status-left ""
    set -g status-right "#[fg=green]#H"

    # Highlight active window
    set-window-option -g window-status-current-style bg=colour164

    # Bind toggle status line to T: C-a T
    bind T set-option -g status


    # Set 256 color display, use new tmux-256color if available
    if-shell '[ -f /usr/share/terminfo/t/tmux-256color ] || [ -f /lib/terminfo/t/tmux-256color ] || [ -f /etc/terminfo/tmux-256color ] || [ -f ~/.terminfo/tmux-256color ]' \
    'set -g default-terminal "tmux-256color"' \
    'set -g default-terminal "screen-256color"'


    # Fix cursor keys when connecting with putty-256color TERM setting in v2.2-2.3
    if-shell "tmux -V | awk '{exit !($2 >= 2.2 && $2 < 2.4)}'" \
    'set -g terminal-overrides "putty*:kLFT@:kRIT@:kLFT5=\eOD:kRIT5=\eOC:kUP5=\eOA:kDN5=\eOB:smkx@:rmkx@"'


    # Allows for faster key repetition
    set -s escape-time 0

    # Rather than constraining window size to the maximum size of any client
    # connected to the *session*, constrain window size to the maximum size of any
    # client connected to *that window*. Much more reasonable.
    setw -g aggressive-resize on

    # Activity monitoring
    setw -g monitor-activity on

    # Set memory and scrollback buffer
    set -g history-limit 50000

    # Set display message timeout
    set-option -g display-time 4000


    # Mouse - allows select pane and resize with mouse (changed in v2.1)
    if-shell "tmux -V | awk '{exit !($2 < 2.1)}'" \
    'set -g mode-mouse on; set -g mouse-resize-pane on; set -g mouse-select-pane on; set -g mouse-select-window on' \
    'set -g mouse on'

    - /etc/profile mc-t es htop-ot automtatan elinditja ha nem mennek vagy a meglevo tmux session-t visszacsatolja:
    # Automatically reattach the openwrt tmux session or create a new one only if it's a terminal login
    if [ -t 0 ] && [ -z "$TMUX" ]; then
    if ! tmux has-session -t openwrt 2>/dev/null; then
    # create new window named 'mc' and run mc in it
    tmux new-session -d -s openwrt >/dev/null
    tmux rename-window -t openwrt:0 'mc'
    tmux send-keys -t openwrt:0 'mc' Enter
    # create new window named 'con', split it and run htop on top
    tmux new-window -t openwrt
    tmux rename-window -t openwrt:1 'con'
    tmux send-keys -t openwrt:1 'htop' Enter
    tmux splitw -v -t openwrt:1
    fi

    tmux -2u attach-session -d -t openwrt
    fi

    - power detach tmux-ben: C-a + C-d

    Kivancsi leszek mennyire stabil a rendszer hosszutavon (pl WiFi problema lesz e), majd jelzek par het mulva, hincs semmi gond.

Új hozzászólás Aktív témák