Home avatar

Deokgon Kim

Register mDNS to AWS Route53

In local network, I can use mDNS names like DESKTOP-RHM4944.local, but I cannot use mDNS name over OpenVPN. I uses openvpn to access office network, and I want to be able to find out client IP of certain PC. and the PC uses DHCP to obtain dynamic IP.

I have AWS environment, so I can use Route32 to resolve local hostname.

  • AWS VPC
  • EC2 with OpenVPN Server
  • RaspberryPi on Office network (connected to OpenVPN Server)
  • Client Laptop (as Remote Worker)
  • Create Route53 Private Zone to be used as .local alternative. I will connect DESKTOP-RHM4944.office instead of DESKTOP-RHM4944.local

(I will not describe here, I have done it before)

Gpg

GnuPG 사용하기

gpg --full-generate-key

내보내기

Reserve Docker Network Aws Vpc uses

  • docker_aws_vpc.sh
    #!/bin/bash
    
    # to prevent docker to pickup 172.31.0.0/16
    docker network \
    create \
    --subnet 172.31.253.0/30 \
    aws_vpc

While you are developing, it is convenient if you are using VPN to access AWS VPC.

Twitter Espeak

What if my tweets can be heard

Install rainbowstream

rainbowstream is a twitter client for linux cli.

  • prepare python venv
python3 -m venv venv
source venv/bin/activate
  • install rainbowstream
pip install rainbowstream
  • run rainbowstream
rainbowstream
# you will be asked to login to twitter

Install espeak

espeak is TTS software for linux

Prep Python Project

Here is how I prepare python projects.

I uses python3 installed by default via OS package. or brew python3 (But if I have a chance to use conda and the others, I may try)

I uses venv module

  • Create venv
    python3 -m venv venv
  • Activate venv
    source venv/bin/activate
  • Here you have Isolated environment you can experiment, not affecting entire OS.
  • Upgrade pip to latest version
    pip install --upgrade pip
  • Install pip-tools for dependencies management
    pip install pip-tools
  • for more information about pip-tools see https://pypi.org/project/pip-tools/
  • Create requirements.in file.
    django>=2.2,<3.0
  • Run pip-compile
    pip-compile
  • You can check cat requirements.txt
    #
    # This file is autogenerated by pip-compile with python 3.10
    # To update, run:
    #
    #    pip-compile
    #
    django==2.2.28
        # via -r requirements.in
    pytz==2022.1
        # via django
    sqlparse==0.4.2
        # via django
  • Install libraries using pip install
    pip install -r requirements.txt
  • You can check installed libraries by pip list
    Package    Version
    ---------- -------
    build      0.8.0
    click      8.1.3
    Django     2.2.28
    packaging  21.3
    pep517     0.13.0
    pip        22.2.2
    pip-tools  6.8.0
    pyparsing  3.0.9
    pytz       2022.1
    setuptools 59.6.0
    sqlparse   0.4.2
    tomli      2.0.1
    wheel      0.37.1