Blog

  • mkdir:Cannot create directory ‘/.NVM’:Permission denied

    How to solve it

  • Enforce Case sensitive usernames in freeradius.

    Solving Case Insensitivity Issues in Freeradius with MySQL

    Introduction: When you install Freeradius with MySQL, you may encounter an issue where customers can log in regardless of the case sensitivity of their username. For example, “DFGT” and “DFGt” would both authorize successfully. This can be resolved by making a few changes to the Freeradius configuration files.

    Problem: In a fresh installation of Freeradius with MySQL, the authorization check and reply queries are set to be case-insensitive. This means that the usernames are not stored in a case-sensitive manner, which can be a security issue for some applications.

    radtest AL6RNs netpap localhost 3 testing123

    Which will authenticate similar to

    Solution:

    To solve this.

    Uncomment the code block below in the file

    vim /etc/raddb/mods-config/sql/main/mysql/queries.conf

    Comment back the following block of code

  • django.db.utils.DataError: (1406, “Data too long for column ‘data_id’ at row 1490”)

    One of the ways this error occurs is when you have existing data that is a varchar and you want to convert to uuid

  • How to Make Mikrotik an OpenVPN client

    Download the openvpn ovpn profile. e.g mikrotik.ovpn

    Ensure tls and tls cert are removed,lzo compression and openvpn supports tcp.

    Navigate to mikrotik and click files

    Click upload files

    Click system > certificates ->Click Import

    The import file will import the certificates.

    Create a VPN profile.

    Navigate to ppp -> profiles ->Click Add New.

    Ensure you give profile a name and enable encryption.Leave other features in default state.

    Create OVPN Client

    Navigate to ppp -> interfaces ->Click add new ->Select ovpn client

    Specify an arbitrary name for the client name.

    Connect to:Specify openvpn server ip,available in the ip

    port:Specify openvpn port

    user:The ovpn profile name used increation of the openvpn client

    profile:Specify the profile specified in the previous step.

    mode:Specify ip

    password:Leave password field blank.

    Certificate:Specify the certificate identified with an underscore 1 or KT

    Specifiy auth as sha1 and cipher as aes 256

    The mikrotik should be able to connect to the vpn server.

  • Customize OPENVPN profile for Mikrotik client

    Mikrotik support for vpn is quite versatile with several VPN clients/server setups to chose from,among them OPENVPN.

    Facts to grasp before deployment of the openvpn:

    Lacks support for

    • udp
    • lzo compression
    • tls
    • sha512

    While deploying the ovpn file,make sure tls is disabled and the tls certificate absent.

    Sample ovpn client for mikrotik

    client
    dev tun
    proto tcp
    remote PUBLIC IP PORT
    resolv-retry infinite
    nobind
    persist-key
    persist-tun
    auth SHA1
    cipher AES-256-CBC
    ignore-unknown-option block-outside-dns
    verb 3
    —–BEGIN CERTIFICATE—– CA —–END CERTIFICATE—–


    —–BEGIN CERTIFICATE—– cert—–END CERTIFICATE—–


    —–BEGIN PRIVATE KEY—– Key—–END PRIVATE KEY—–

en_USEnglish