I like to auto-upgrade fedora systems with yum-cron. To do the same thing on raspbian:
rpi# aptitude install cron-apt
rpi# echo 'dist-upgrade -y' > /etc/cron-apt/action.d/4-upgrade
You can monitor /var/log/cron-apt/log and /var/log/apt/history.log to confirm that upgrades are happening.
Random bits of mostly technical stuff, usually from cases where no good search hits addressed a problem, and I feel the need to document the solution in a note to myself. I figure that if I blog it, then at least it'll be findable by others, too.
Monday, June 17, 2013
Monday, May 20, 2013
OpenWrt - restrict LuCI and ssh to a specific host
For security, I only ever want to connect to my OpenWrt router from a specific internal host. Here is the firewall setup to accomplish that.
relevant part of /etc/config/firewall:
# Only allow 192.168.1.6 to access LuCI http
config 'rule'
option '_name' 'Restrict-LuCI-http'
option 'src' 'lan'
option 'src_ip' !192.168.1.6
option 'dest_ip' 192.168.1.1
option 'dest_port' 80
option 'proto' 'tcp'
option 'target' 'REJECT'
# Only allow 192.168.1.6 to access LuCI https
config 'rule'
option '_name' 'Restrict-LuCI-https'
option 'src' 'lan'
option 'src_ip' !192.168.1.6
option 'dest_ip' 192.168.1.1
option 'dest_port' 443
option 'proto' 'tcp'
option 'target' 'REJECT'
# Only allow 192.168.1.6 to access ssh
config 'rule'
option '_name' 'Restrict-ssh'
option 'src' 'lan'
option 'src_ip' !192.168.1.6
option 'dest_ip' 192.168.1.1
option 'dest_port' 22
option 'proto' 'tcp'
option 'target' 'REJECT'
Sunday, May 5, 2013
Things to do in Seattle
I've been maintaining a list of things to do in Seattle and the surrounding area since I moved here. And here it is: http://goo.gl/HVddr
Leave a comment if you have things I should add.
Leave a comment if you have things I should add.
Sunday, October 7, 2012
Fedora 17 /tmp/ks.cfg moved to /run/install/ks.cfg
My kickstart files have always contained this for kickstart configs pulled over the network:
%post --nochroot
cp /tmp/ks.cfg /mnt/sysimage/root/.
%end
That broke in Fedora 17 because ks.cfg moved to /run/install/ks.cfg. So update your kickstart files...
%post --nochroot
cp /tmp/ks.cfg /mnt/sysimage/root/.
%end
That broke in Fedora 17 because ks.cfg moved to /run/install/ks.cfg. So update your kickstart files...
Sunday, July 15, 2012
2001 GTI MK4 glove box hinge repair
The MK4 Golfs have a notoriously bad glove box design that leads to several common failure modes, including broken hinges. My glove box hinge broke several years ago. I was able to just superglue it back together and adjust the door shock to make it less stiff.
Yesterday I broke the same hinge again, and this time superglue and epoxy were not working. So my father-in-law applied this fix:
Yesterday I broke the same hinge again, and this time superglue and epoxy were not working. So my father-in-law applied this fix:
Friday, December 17, 2010
ssh, socks, and selinux
Trying to use ssh's -D option to setup a SOCKS proxy and getting the error below?
channel 3: open failed: administratively prohibited: open failed
If you are running SELinux (e.g. Fedora), you need to run:
# setsebool -P sshd_forward_ports on
channel 3: open failed: administratively prohibited: open failed
If you are running SELinux (e.g. Fedora), you need to run:
# setsebool -P sshd_forward_ports on
Monday, August 2, 2010
Confirm your dns recursive resolver
I just encountered this elegant implementation for a service that confirms what dns resolver is performing your recursive queries. Just go to http://myresolver.info.
The implementation details are at http://techblog.igwan.eu/2010/02/how-to-know-what-dns-server-your.html.
The implementation details are at http://techblog.igwan.eu/2010/02/how-to-know-what-dns-server-your.html.
Monday, July 26, 2010
VirtualBox rocks
I used VMware Server 1 for the longest time to run several Linux virts. I needed to reinstall virtualization software on a new PC, but VMware Server version 2 is horrible, just awful. So instead of reinstalling the old version 1, which is a dead end, I decided to try VirtualBox. I tried it last year, but I didn't have a good experience. This time I'm very impressed. It has exactly the right set of features to quickly and simply create virts, without extra bloatiness.
Nice work, Sun, er, Oracle.
Saturday, July 3, 2010
Windows 7 shortcut arrow is too big
The Windows 7 shortcut indicator arrow is way too big. It covers a fourth of the actual icon.
Here's a procedure that worked for me to switch to the smaller XP overlay arrow:
http://www.sevenforums.com/tutorials/10945-shortcut-arrow-change.html
Update: 2015-01-19: The original url is obsolete. The updated url is http://www.sevenforums.com/tutorials/3606-shortcut-arrow-change-remove-restore.html
Update: 2015-01-19: The original url is obsolete. The updated url is http://www.sevenforums.com/tutorials/3606-shortcut-arrow-change-remove-restore.html
Tuesday, June 29, 2010
iTunes auto delete won't work -- fixed
I upgraded to a new computer with Windows 7 and moved my iTunes library to it. Right away I noticed that podcast auto delete was not working, even when I right-clicked on specific podcasts and made sure that "Allow Auto Delete" was on.
The fix was to open the podcast settings dialog and change the "episodes to keep" option. The problem is that in the latest iTunes, it's not obvious where to find that dialog box. It's not in the main preferences dialog. Instead find it by going to the podcasts view. Then look at the bottom of the window. You'll find "Unsubscribe" and "Settings..." buttons. Click "Settings...", then change the "Settings for:" field to "Podcast Defaults". Set "Episodes to keep:" to "All unplayed episodes".
Wednesday, June 16, 2010
Fedora, Postfix, and SELinux
Getting these types of errors in /var/log/maillog?
Jun 16 09:47:14 myhostname postfix/local[25474]: C269521F8C: to=, relay=local, delay=0.07, delays=0.02/0/0/0.04, dsn=5.2.0, status=bounced (cannot update mailbox /var/mail/root for user root. unable to create lock file /var/mail/root.lock: Permission denied)
You're running into SELinux denials for local mail delivery. In Fedora, correct that with:
# togglesebool allow_postfix_local_write_mail_spool
EDIT: I just realized that togglesebool only changes the running config and does not survive reboots. The permanent fix is:
# setsebool -P allow_postfix_local_write_mail_spool 1
Jun 16 09:47:14 myhostname postfix/local[25474]: C269521F8C: to=
You're running into SELinux denials for local mail delivery. In Fedora, correct that with:
# togglesebool allow_postfix_local_write_mail_spool
EDIT: I just realized that togglesebool only changes the running config and does not survive reboots. The permanent fix is:
# setsebool -P allow_postfix_local_write_mail_spool 1
Saturday, February 6, 2010
YM845VKM3QX
YM845VKM3QX - Serial number of my son's iPod Nano stolen from Newport High School in January 2010... :(
Friday, October 30, 2009
Ubuntu and the Windows MBR
I installed Ubuntu 9.10 on an external usb drive yesterday, with Windows XP on the primary drive. I forgot that Ubuntu decides by default to write grub to the primary drive in this situation, overwriting the Windows MBR. Ergh! Why doesn't Ubuntu warn about that first?!
In addition to overwriting the Windows MBR, this grub setup also won't boot anything without the external usb drive connected.
I wanted to simply put back the XP MBR, but in this case I don't have the XP Administrator password, so I couldn't boot into the Recovery Console. Why does XP only offer this method for fixing the MBR?!
Ubuntu and Windows are annoying me today.
Fortunately I do have a local admin account on Windows, so I was able to use the third-party mbrfix.exe to rewrite the MBR. Again, why doesn't Windows include such a utility? *sigh*
In addition to overwriting the Windows MBR, this grub setup also won't boot anything without the external usb drive connected.
I wanted to simply put back the XP MBR, but in this case I don't have the XP Administrator password, so I couldn't boot into the Recovery Console. Why does XP only offer this method for fixing the MBR?!
Ubuntu and Windows are annoying me today.
Fortunately I do have a local admin account on Windows, so I was able to use the third-party mbrfix.exe to rewrite the MBR. Again, why doesn't Windows include such a utility? *sigh*
Subscribe to:
Posts (Atom)
