PHP, Ubuntu Desktop, and WordPress… and I’m perfectly happy with that.
Fight me.
PHP, Ubuntu Desktop, and WordPress… and I’m perfectly happy with that.
Fight me.
Trying out running Ubuntu on my mid-2015 MacBook Pro. Except for some quirks (and some lag, due to…well, the os being mounted from a thumb drive), it’s remarkably enjoyable.
sudo dpkg -r google-chrome-stable
.sudo rpm -e google-chrome-stable
.Kind of lame. I don’t like it when plugins add fluff to my content/website. Aside from mentioning it here, I may submit a ticket for this to find out if it’s a bug or feature.
Here’s a comprehensive sudo ufw
(Uncomplicated Firewall) cheatsheet for managing firewall rules on an Ubuntu server:
sudo ufw enable
sudo ufw disable
sudo ufw status
sudo ufw status verbose
for detailed output.sudo ufw reset
sudo ufw allow <port>
sudo ufw allow 22
(allows SSH)sudo ufw allow <port>/<protocol>
sudo ufw allow 80/tcp
(allows HTTP)sudo ufw allow <start port>:<end port>/protocol
sudo ufw allow 1000:2000/tcp
sudo ufw allow from <IP>
sudo ufw allow from 192.168.1.100
sudo ufw allow from <IP> to any port <port>
sudo ufw allow from 192.168.1.100 to any port 22
sudo ufw allow from <subnet>
sudo ufw allow from 192.168.1.0/24
sudo ufw deny <port>
sudo ufw deny 23
(denies Telnet)sudo ufw deny <port>/<protocol>
sudo ufw deny 80/tcp
sudo ufw deny from <IP>
sudo ufw deny from 192.168.1.100
sudo ufw status numbered
sudo ufw delete <rule number>
sudo ufw delete allow <port>
sudo ufw delete allow 22
sudo ufw delete deny <port>
sudo ufw delete deny 23
sudo ufw logging on
off
to disable logging.sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw default allow incoming
sudo ufw default deny outgoing
sudo ufw limit <port>
sudo ufw limit ssh
(limits SSH connections to prevent brute force attacks)sudo ufw allow <service>
sudo ufw allow OpenSSH
sudo ufw app list
sudo ufw allow <app profile>
sudo ufw allow 'Apache Full'
sudo ufw status
sudo ufw status verbose
sudo ufw status numbered
sudo ufw reload
sudo ufw show raw
This cheatsheet covers common UFW commands and options, providing a solid reference for managing firewall settings on Ubuntu.
This website is in a constant state of flux. I updated the home page, archives, and posts layout for a better UI. Thin and min, is my goal.
I’d like to relay all my Ubuntu 22.04 email through Amazon SES.
Use at your own risk. Like seriously, do some research prior to implementing any of this into your own environment. Consider factors like costs, scalability, etc.
To relay all your email through Amazon SES (Simple Email Service) on an Ubuntu 22.04 server, you will need to:
Postfix
to relay email through SES.Here are the detailed steps:
Open a terminal on your Ubuntu server and install Postfix
:
sudo apt update
sudo apt install postfix
During installation, choose “Internet Site” and set the system mail name to your domain name (e.g., example.com
).
Edit the Postfix configuration file:
sudo nano /etc/postfix/main.cf
Add or modify the following lines to configure Postfix to use Amazon SES as a relay host:
relayhost = [email-smtp.us-east-1.amazonaws.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_security_level = encrypt
smtp_tls_note_starttls_offer = yes
Replace email-smtp.us-east-1.amazonaws.com
with the correct SES SMTP endpoint for your region. You can find the list of SMTP endpoints in the Amazon SES documentation.
Create and edit the SASL password file:
sudo nano /etc/postfix/sasl_passwd
Add the following line, replacing the SMTP endpoint, username, and password with your SES SMTP details:
[email-smtp.us-east-1.amazonaws.com]:587 YOUR_SES_SMTP_USERNAME:YOUR_SES_SMTP_PASSWORD
Secure the file permissions:
sudo chmod 600 /etc/postfix/sasl_passwd
sudo postmap /etc/postfix/sasl_passwd
Restart the Postfix service to apply the changes:
sudo systemctl restart postfix
v=spf1 include:amazonses.com ~all
Send a test email to ensure everything is configured correctly:
echo "Test email body" | mail -s "Test email subject" your-email@example.com
Check the recipient’s inbox and the /var/log/mail.log
file on your server for any errors.
This setup ensures your emails are securely relayed through Amazon SES, leveraging its robust infrastructure.
The information provided in this blog post is for educational and informational purposes only. The steps and instructions are based on personal experience and research, and are intended to help users configure email relaying through Amazon SES on Ubuntu 22.04.
No Warranty: The author and publisher make no representations or warranties of any kind, express or implied, about the completeness, accuracy, reliability, suitability, or availability with respect to the information, products, services, or related graphics contained in this blog post for any purpose. Any reliance you place on such information is therefore strictly at your own risk.
Limitation of Liability: In no event will the author or publisher be liable for any loss or damage including without limitation, indirect or consequential loss or damage, or any loss or damage whatsoever arising from loss of data or profits arising out of, or in connection with, the use of this blog post.
External Links: Through this blog post, you are able to link to other websites which are not under the control of the author. We have no control over the nature, content, and availability of those sites. The inclusion of any links does not necessarily imply a recommendation or endorse the views expressed within them.
By using the information in this blog post, you agree to the terms of this disclaimer. If you do not agree to these terms, please do not use the information provided.