Setup Ubuntu to send mail via a remote SMTP server

We will configure a server running Ubuntu to send all mail out to a remote email address via an SMTP server. This is a redo of these instructions..

Again, I just copied an instructional as here. Cant be bothered copying it here, but I did all those steps, except I commented out this line:

#smtp_tls_CAfile = /etc/postfix/cacert.pem

Because eh.

I looked at this log and got some useful info: /var/log/mail.log

SMTPS wrappermode (TCP port 465) requires setting "smtp_tls_wrappermode = yes", and "smtp_tls_security_level = encrypt" (or stronger) 

So I added those lines to my config file.
Then in testing I noticed that yay it actually sent the mail, although it bounced due to the ‘from address’ not being configured properly, so we create this file:
sudo nano /etc/postfix/generic with these contents:

username@hostname name@domain 
@hostname name@domain  
#use 'postmap /etc/postfix/generic' to hash this file 
#then 'service postfix restart'  

Where hostname is the hostname for the machine, and name@domain is the sender address, which usually needs to be valid with the SMTP server – although Google actually allows improper addresses. You could create different instances for different users, i.e one for root perhaps
Then add this line to the config:
smtp_generic_maps = hash:/etc/postfix/generic

Finally:
sudo postmap /etc/postfix/generic
sudo service postfix restart

Done

Looking into HHO

I have heard about HHO a few years ago, and the last couple days I have been looking into this tech again. It appears the game of whack a mole is continuing by the petro dollar powers that be – many HHO site links are down and only visible in web archives. That being said, there seem to be no shortage of enthusiast inventors making their own devices and websites

HHO Technology

Heating with Hydrogen HHO or Hcat. This man does just that.

I have found a full kit for your car made by an auto shop “LaBella’s Auto Repair”, that even includes an OBD II computer to modify the ECU timing automatically. Seems super simple and I am considering buying one.. until…

HHO Installation Frequently Asked Questions

The above video seems very knowledgeable.. perhaps delving into this would require a much deeper dive than a simple plug in automatic OBD ECO controller..
Found an Australian 21 cell device..
This also looks worth watching:

It Runs On Water Stanley Meyer (1995) MUST-SEE VIDEO

Spinning Up Ubuntu 16.04 on a VPS instance

  • My VPS provider (Vultr) allows inserting a public key at the time of a new instance creation, so I created a new key using an existing Linux command line:
    ssh-keygen -t rsa
  • Name server hostname (I used these instructions (archive) for hostname)
  • Set reverse DNS in VPS server console equal to FQDN
  • Change SSH port & disable password authentication with
    sudo nano "/etc/ssh/sshd_config"
    then restart ssh
    sudo systemctl restart ssh
  • create non root user, copy .ssh folder from root to their profile, making sure to chown newuser for the authorized_keys file, and add the user to group sudo – sudo addgroup groupname.
  • Add auto security updates.
    sudo apt-get install unattended-upgrades
    sudo dpkg-reconfigure unattended-upgrades
    sudo nano /etc/apt/apt.conf.d/50unattended-upgrades **requires root email for notifications*
  • Set time zone
    sudo dpkg-reconfigure tzdata

Duty Cycle Protector

I have a solar pool pump inline with a normal pool filter pump. If the pool pump turns off while the solar pump is on.. then the solar pump can’t pump properly. This is an issue since the filter pump sometimes will turn off in hot weather (or if hot water is flowing through it). I built a sensor to require the filter pump to run in order to run the solar pump. Also I ran an external switch for the solar pump.

I will note that working with mains voltages is inherently dangerous, and I’d advise against it for anyone not sufficiently trained.

The circuit consists of a current sensing board ($5.50 with delivery) and a Zero-Cross SSR ($12 delivered…). The sensor is just a coil around one of the conductors in a ‘sensor’ mains extension cable. When current is high enough through the sensor, the SSR is in turn energised, closing the circuit through a second ‘trigger’ extension cable . I put a switch in between the sense output and the SSR. That’s basically it. I thought about a pull-down resistor on the input for the SSR, but since it needs 5v plus a small current to trigger.. I think it should be fine left open.

Initially I used a current sense board with no relay output, although this did not live up to specs delivering 5v digital output and caused a bunch of issues… eventually I gave up trying to implement a transistor/relay and bought a sense board with an inbuilt relay. The components in the system run off 5v and are powered by a USB power adaptor 🙂

It Works!

OpenVPN Server on Ubuntu 16.04

Following this guide.

NOTE 1: In the part where they edit /etc/openvpn/server.conf

I edited the server directive to read:
server 192.168.155.0 255.255.255.0

then my UFW rules are

# START OPENVPN RULES
# NAT table rules
*nat
:POSTROUTING ACCEPT [0:0]
# Allow traffic from OpenVPN client to ens3 (change to the interface you discovered!)
-A POSTROUTING -s 192.168.155.0/24 -o ens3 -j MASQUERADE
COMMIT
# END OPENVPN RULES
Continue reading “OpenVPN Server on Ubuntu 16.04”