wiki:RB1100AHX4

Version 9 (modified by krit, 3 days ago) (diff)

--

RB1100AHx4 Dude

[admin@T108] /container> /disk/print 
Flags: B - BLOCK-DEVICE; M - MOUNTED
Columns: SLOT, MOUNT-POINT, MODEL, SERIAL, INTERFACE, SIZE
#    SLOT   MOUNT-POINT  MODEL                 SERIAL             INTERFACE                SIZE
0 BM sata1  sata1        M.2 (S42) 3TE7 2.5in  B0012307210120143  SATA 6.0 Gbps  55 021 510 656

[admin@T108] /container/config> print 
    registry-url: https://registry-1.docker.io
        username:                             
        password:                             
       layer-dir:                             
          tmpdir: pull                        
     memory-high: unlimited                   
  memory-current: 63.5MiB                     
[admin@T108] /container/config> ..
[admin@T108] /container> mounts/print 
Columns: NAME, SRC, DST, READ-ONLY
#  NAME         SRC                 DST                READ-ONLY
0  msqt_config  /mosquitto_mounted  /mosquitto/config  no       
1  linux_nginx  /sata1/nginx        /docker/nginx      no       
[admin@T108] /container> 
[admin@T108] /container> /container/add remote-image=library/nginx:latest interface=veth1 root-dir=/sata1/nginx mount=linux_nginx logging=yes

Hap ax2

Setup firewall NAT on Mikrotik

[admin@MK53] /ip/firewall/nat> print 
Flags: X - disabled, I - invalid; D - dynamic 
 0    ;;; defconf: masquerade
      chain=srcnat action=masquerade in-interface=bridge out-interface=wifi1 
      out-interface-list=WAN log=no log-prefix="" ipsec-policy=out,none 
 
 1    ;;; NAT all out traffic from containers to the wolrd
      chain=srcnat action=masquerade src-address=172.17.0.0/24 
 
 2    ;;; Allow in comming 192.168.108.1:8000 to 172.17.0.3:8000
      chain=dstnat action=dst-nat to-addresses=172.17.0.3 to-ports=8000 protocol=tcp 
      dst-address=192.168.108.1 dst-port=8000 
[admin@MK53] /ip/firewall/nat> 
/disk add type=tmpfs tmpfs-max-size=128M slot=ram
/container/add remote-image=library/alpine:latest interface=veth1 root-dir=ram/ cmd="tail -f /dev/null" logging=yes name=alpine

After we shell in container

apk update
apk add --no-cache python3
apk add --no-cache inetutils-telnet
root@MK53:~# cat .ashrc 

alias ls='ls --color=auto'
alias grep='grep --color=auto'


# ANSI Color Codes (e.g., 31=Red, 32=Green, 34=Blue)
# Reset color is 0
export PS1_RED='\e[31m'
export PS1_GREEN='\e[32m'
export PS1_BLUE='\e[34m'
export PS1_YELLOW='\e[33m'
export PS1_RESET='\e[0m'

# Example: [user@host] /path $
# \u = username, \h = hostname, \w = working dir
# \n = newline, \$ = # or $
PS1='${PS1_RED}[\u@\h]${PS1_YELLOW}:${PS1_GREEN}\W${PS1_RESET} \$ '  

#PS1='\[\e[31m\]\u@\h\[\e[0m\]:\[\e[32m\]\w\[\e[0m\]\$ '