Skip to content

Instantly share code, notes, and snippets.

@sfloess
Last active November 10, 2022 21:03
Show Gist options
  • Save sfloess/e0443b9a22fc60d5e4678f093fcada54 to your computer and use it in GitHub Desktop.
Save sfloess/e0443b9a22fc60d5e4678f093fcada54 to your computer and use it in GitHub Desktop.

Cabin Hardware

cabin-ap

DD-WRT

Startup
log() {
    echo "---------------------------------------" 2>&1 >> /tmp/flossware.log
    echo $@ 2>&1 >> /tmp/flossware.log
    echo "---------------------------------------" 2>&1 >> /tmp/flossware.log
    echo 2>&1 >> /tmp/flossware.log
}

doModProbe() {
    log "Running modprobe..."

    /sbin/modprobe cifs
    /sbin/modprobe isofs
    /sbin/modprobe nfsd
    /sbin/modprobe nfs
    /sbin/modprobe xfs
}

doMount() {
    log "Mounting dirs..."

    mkdir -p /tmp/mnt/sda

    mount /dev/sda /tmp/mnt/sda
}

doSleep() {
    log "Sleeping 25s..."

    sleep 25s 
}

doBind() {
    log "Binding .ssh dirs..."

    mount /tmp/mnt/sda/debian/root/.ssh /root/.ssh
}

doDebian() {
    log "Starting debian..."

    /tmp/mnt/sda/debian/etc/init.d/debian start
}

startup() {
    doModProbe

    doSleep

    doMount
 
    doBind

    doDebian
}

startup &
DNSMasq
# ---------------------------------------------------------------------

domain-needed
expand-hosts
no-hosts
no-resolv
no-negcache
no-poll
stop-dns-rebind

# Never forward addresses in the non-routed address spaces.
bogus-priv

#cache-size=1000

# ---------------------------------------------------------------------

domain=isenhour.org

# ---------------------------------------------------------------------

server=/isenhour.org/
server=1.1.1.1
server=1.0.0.1
server=8.8.8.8
server=8.8.4.4

all-servers

# ---------------------------------------------------------------------

listen-address=192.168.1.1

# ---------------------------------------------------------------------

dhcp-lease-max=1763

# Gateway
dhcp-option=3,192.168.1.1

dhcp-range=192.168.1.10,192.168.1.254,255.255.255.0,15m

# ---------------------------------------------------------------------

# Domain
dhcp-option=40,fisenhour.org

# NTP
dhcp-option=42,192.168.1.1

# TFTP
dhcp-option=66,192.168.1.1

dhcp-option=6,192.168.1.1

dhcp-authoritative

# ---------------------------------------------------------------------
# Main AP
# ---------------------------------------------------------------------
address=/cabin-ap/cabin-ap.isenhour.org/192.168.1.1
ptr-record=1.1.168.192.in-addr.arpa,cabin-ap.isenhour.org

address=/roku/roku.isenhour.org/192.168.1.2
ptr-record=2.1.168.192.in-addr.arpa,roku.isenhour.org
dhcp-host=20:EF:BD:8C:AD:D8,roku,192.168.1.2,15m

address=/workstation/workstation.isenhour.org/192.168.1.3
ptr-record=3.1.168.192.in-addr.arpa,workstation.isenhour.org
dhcp-host=4e:e8:c6:f7:d3:a1,workstation,192.168.1.3,15m

address=/redhat-workstation/redhat-workstation.isenhour.org/plex/plex.isenhour.org/192.168.1.4
ptr-record=4.1.168.192.in-addr.arpa,redhat-workstation.isenhour.org
dhcp-host=52:1b:fc:78:ed:e9,redhat-workstation,192.168.1.4,15m

# ---------------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment