Protecting Linux Login with 2FA

This is definitely not the first time I’ve tried getting this working, but glad I was finally able to. Looks like if I had read a bit more, I never would have run into issues…

By the second or third time I ran into problems, I at least figured out why: with my home directory being encrypted, the “secret” 2FA files could not be accessed & verified.

Now for the fun part… It looks like Google had the instructions for encrypted home directories in the README the whole time.

Encrypted home directories
If your system encrypts home directories until after your users entered their password, you either have to re-arrange the entries in the PAM configuration file to decrypt the home directory prior to asking for the OTP code, or you have to store the secret file in a non-standard location:

auth required secret=/var/unencrypted-home/${USER}/.google_authenticator

would be a possible choice. Make sure to set appropriate permissions. You also have to tell your users to manually move their .google_authenticator file to this location.

In addition to “${USER}”, the secret= option also recognizes both “~” and ${HOME} as short-hands for the user’s home directory.

When using the secret= option, you might want to also set the user= option. The latter forces the PAM module to switch to a dedicated hard-coded user id prior to doing any file operations. When using the user= option, you must not include “~” or “${HOME}” in the filename.

The user= option can also be useful if you want to authenticate users who do not have traditional UNIX accounts on your system.

So, after getting through that tedious “reading” thing, I followed their suggestion, & created the “unencrypted-home” directory, moved the ~/.google_authenticator file there, edited /etc/pam.d/common-auth & included the path to the file at the encrypted location. After that… Working as expected!

user@Hostname:~$ cat /etc/pam.d/common-auth | tail -n 1
auth required secret=/var/unencrypted-home/${USER}/.google_authenticator

FINALLY Got my OpenVPN Server Setup on My DD-WRT Router

This took way longer than I would have liked, but at least it seems to be working right now.

After moving recently, I needed to purchase a new router, leaving my rooted Google WiFi AP’s behind. I decided to replace it with a D-LINK AC2600 EXO MU-MIMO Wi-Fi Router. After some more router related fun, I was able to get DD-WRT custom firmware running on the device. With that finally in place, my next project was to get the OpenVPN Server feature enabled. I had all the certificates & keys I needed, it was just a matter of getting the right config in the DD-WRT Admin GUI. Below is what I finally had in the “Additional Config” field that, that ended up working:

push “route”
push “dhcp-option DNS”
verb 5
dev tun0
proto udp4
keepalive 10 120
dh /tmp/openvpn/dh.pem
ca /tmp/openvpn/ca.crt
cert /tmp/openvpn/cert.pem
key /tmp/openvpn/key.pem
script-security 2
# Only use crl-verify if you are using the revoke list – otherwise leave it commented out
# crl-verify /tmp/openvpn/ca.crl
# management parameter allows DD-WRT’s OpenVPN Status web page to access the server’s management port
# port must be 5001 for scripts embedded in firmware to work
# management localhost 5001

Where is my local subnet, & is a subnet I’m assigning to VPN clients.

I haven’t started configuring clients yet, but don’t believe that will be anywhere near as difficult as getting the server running. For reference, below is a history of the commands I ran to get the certificates, keys, etc setup for the server:

v3ritas@Hostname:~/.openvpn/20190101$ history
2956 make-cadir 20190101
2957 cd 20190101/
2958 ls
2959 nano vars
2960 source vars
2961 cp openssl-1.0.0.cnf openssl.cnf
2962 source vars
2963 ./clean-all
2964 ./build-ca
2965 ./build-key-server OpenVPN-Server
2966 ./clean-all
2967 nano vars
2968 ./build-ca
2969 source vars
2970 ./build-ca
2971 ./build-key-server OpenVPN-Server
2972 ./build-dh
2973 ls keys
2974 openvpn –genkey –secret pfs.key
2975 ls keys
2976 cat keys/ca.crt
2977 cat OpenVPN-Server.crt
2978 cat keys/OpenVPN-Server.crt
2979 cat keys/OpenVPN-Server.key
2980 cat keys/dh4096.pem
2981 cat pfs.key
2982 md5 ~/Downloads/factory-to-ddwrt.bin
2983 md5 ~/Downloads/dlink-dir882-a1-webflash.bin
2984 ./build-key Client01
2985 ls keys
2986 cat keys/ca.crt
2987 cat keys/OpenVPN-Server.crt
2988 cat keys/OpenVPN-Server.key
2989 cat keys/dh4096.pem
2990 cat pfs.key

Just of dump of my command history.

New Nintendo Switch Payload: ArgonNX

Guillem96 has a new payload available on GitHub: argon-nx.

As he states in the description there, it’s meant to be used to choose which payload you’d actually like to launch; just use the ArgonNX payload, & then choose from any BIN you have located in the \argon\payloads\ directory. What’s nice about this is that you can choose the logos to go along with each BIN. Still have some work to do, but this is what my selection screen looks like right now:

Photo of the ArgonNX payload running.
Photo of the ArgonNX payload running.
ArgonNX logos.
Some quick logos I put together to be used with ArgonNX. Crappy screenshot because apparently WordPress \ Gutenberg views BMP files as a security risk… See screenshot below.
BMP files are a security risk?

Homebrewing ALL THE THINGS

Pretty accurate description of what I’ve been up to recently.

Since getting homebrew running on my Nintendo Switch, I’ve been booting up some old hardware & getting homebrew &\or custom firmware running there. The most recent three after the Switch have been my Nintendo Wii U, PlayStation Vita, & PlayStation 3. I’ve had CFW running on my Vita for a while, but also haven’t turned it on in ages. I came back to some interesting to features in the homebrew scene which was a nice surprise.

It took me a little while to get homebrew up on my Wii U, but was much easier than what I’ve been dealing with on the Switch. Same goes for the PlayStation 3. I’ve not yet gotten a chance to play around much with either system, but hopefully that will change in the upcoming weeks. I’ll be sure to post more information then, but in the meantime, here are some helpful sites I used in getting homebrew running on my Wii U & PS3:

Scammers Using Microsoft’s Support Site

I just came across this video (posted yesterday), where scammers are leveraging Microsoft’s legitimate support site at This was after I received a fake Microsoft support call. Unfortunately, I didn’t have a dummy VM ready to waste their time, but glad I found out about the use of Microsoft’s site. Because Microsoft uses LogMeIn, their support site seems to just forward the code to LogMeIn to start the session.

See the video below for how the site is used:

ANOTHER GOOD article about passwords

Very glad to see another post by a site, giving good information on handling passwords, security question answers, & the recommendation to use password managers. I last had a post about this in July, when Dreamhost also put out a good article about creating strong passwords for account security. The link to that article is below as well.

Lifehacker: Use Your Password Manager for Security Answers, Too

Dreamhost: How to Create Strong Passwords to Keep Your Website Safe