Custom Search

Friday, December 24, 2010

End of the Year Hodge-Podge

Put off upgrading way too long. As to how long, I’m embarrassed
to say. Previously I could pretty much get things how I wanted
in a couple of days, even after doing a new install and getting
all my old stuff back in. This time it took a couple of weeks to
really get where I wanted to be with the system. Not keeping up
with changes can bite one in the butt.

I’ve got a Linksys WRT54G-TM router running DD-WRT v24-sp2
firmware. Got an account at Hurricane Electric and if you
have got IPv6 working already, http://ipv6.he.net/. Also
have an account at DynDNS.com for when my ISP changes the
IP address on my cable modem and a hostname that synchronizes
with it so I can reach home when I’m traveling. I setup a
VPN too, and am now able to surf through it no matter where
I’m connected at. Good for for instance, we go to B&N a lot
and they’ve got free Wifi. I connect to them, then activate
the the connection to my home VPN. Works great so far. Just
wish I’d figure out how to get IPv6 to work on the it. The
router does DHCP for my LAN and I’ve got it set to give the
same IP address to each box each time. Makes things easier
on me moving and copying files around the LAN. Ran into a
problem with my browser on a lot of IPv6 sites, where they’d
revert to IPv4 or not load at all. I had missed the option
mentioned in the man page ‘family inet6 inet4′ which sets
the preference to IPv6 as it’s first. When you use DHCP to
assign addresses, each time a box boots and starts the network,
/etc/resolv.conf gets overwritten. If you have some settings
you want in it like I did, you get around the overwrite
problem by putting the options in /etc/resolv.conf.tail and
then they show up in resolv.conf okay. Also had added some
stuff to /etc/pf.conf so icmp would be passed, as they’re
required for IPv6 to work right on my tunnel.

#Under the macros section:
icmp_types=”{ echoreq, echorep, unreach }”

#Under the rules section:
pass inet proto icmp all icmp-type $icmp_types
pass inet6 proto icmp6

***********************************************************

Fiddled around with tmux quite a bit, trying to get it configured
the way I need it. Hadn’t used it in a while and had forgotten quite
a bit. My setup is not real complicated, I just had problems with
how I was calling the program. Here’s my .tmux.conf:

# Default global options.
set status-bg yellow
set status-fg black
set default-command “exec /bin/ksh -l”
set -g status-right ‘%a %m/%d/%y %H:%M’
set -g status-interval 5
set bell-action current
set history-limit 2000

# Prefix key.
unbind C-b
set -g prefix C-s

# Keys to switch session.
bind q switch -t0
bind Q switch -t0
bind w switch -t1
bind W switch -t1
bind -r C-n next-window
bind -r C-p previous-window
bind ‘”‘ choose-window

# Other key bindings.
bind i list-windows
bind I list-windows
bind ‘-’ split-window -dv
bind ‘|’ split-window -dh
bind “‘” new-window
bind < resize-pane -L 1
bind > resize-pane -R 1
bind _ resize-pane -D 1
bind u resize-pane -U 1

# Session Initialization

# First Session.

new -d -s0 -nmain1

neww -d -nmutt
neww -d -nwork1
splitw -v -p 50 -t 2
splitw -h -p 50 -t 2
neww -d -nwork2
splitw -h -p 50 -t 3
neww -d -nnet
selectw -t 0

# Second Sesson.

new -d -s1 -nmain2
neww -d -nshell1
splitw -v -p 50 -t1
neww -d -nshell2
splitw -v -p 50 -t2
neww -d -nshell3
splitw -v -p 50 -t3
selectw -t 0

Lot of split panes and stuff there I probably don’t need,
but I needed to know how to do it, so I just did some
experimenting with it. Put a few aliases in ~/.kshrc:

alias tm0=’tmux attach-session -t 0′
alias tm1=’tmux attach-session -t 1′
alias tmk=’tmux kill-server’

***********************************************************

Side note while I’m thinking of it. Never had the occasion
to pipe anything to vim before. Started wondering how to
do it. Here’s how:

$ cat file.txt | vim -

***********************************************************

I built the gimp, sane-frontends, and sane-backends the other
day. I expected to have an ‘Acquire’ choice in the gimp menu
but it wasn’t there. Then my buddy in the local LUG reminded
me to install xsane. The gimp no longer has the ARG to build
it with mmx, but I had to put some extra switches on the make
command when I built

$ cd /usr/ports/graphics/sane-frontends/
sudo env FLAVOR=”gimp” make install

$ cd ../sane-backends/
sudo make -D --with-gphoto install

$ cd ../xsane/
sudo env FLAVOR=”gimp” make install

***********************************************************

Got tired of the nag on the console about clamav being out of
date. I had installed the package for 4.8 release, 0.96.1 which
was causing the nag. Uninstalled latest version, 0.96.4 and
built it. Seemed like it took a lot longer than it did with
previous versions, but it built and installed okay. That
version didn’t last long. Uninstalled it, then built 0.96.5
on 20101214. Built and installed okay. Just a pain in the butt
with the clamav uid and gid thing. Old version used _clamav.
Last few versions want clamav. You can change it using the
following to avoid the error when running ./configure:

sudo ./configure –with-group=_clamav –with-user=_clamav

***********************************************************

Have never used irc extensively but taught myself enough to
know how to configure and get around in irssi. Installed silc
which is supposed to be more secure than regular irc and is
built around irssi. Including some notes here on how I was
able to connect to a silc server over tor:

1) If you haven't done so already, install tor and socat 2) Start /usr/local/bin/tor which defaults to port 9050

*Side Note on tor*
To run it all the time you can start it in /etc/rc.local at
boot time:

fi

if [ -x /usr/local/bin/tor ]; then
echo -n ‘ starting tor’;
/usr/local/bin/tor
fi

3) Now run this command as root or with sudo:
socat TCP4-LISTEN:706,bind=localhost,range=127.0.0.1/32,fork \
SOCKS4A:127.0.0.1:silc.silcnet.org:706,socksport=9050 > socat_log.$$ 2>&1 &

4) Start silc

5) After entering password and silc is running:
/connect 127.0.0.1 706

A bit slower than a regular connection but much more secure
since your real IP address isn’t visible.

Labels: , , , , , , , , ,