Showing posts with label arch. Show all posts
Showing posts with label arch. Show all posts

Friday, March 2, 2012

Tons of DNS requests from pidgin - googletalk

So I was getting TONS of DNS requests from my computer.  I had to figure out what was going on here's 2 requests and responses I've arbitrarily yoinked out of a wireshark dump:
2    0.000436    192.168.2.6    68.105.28.12    DNS    87    Standard query PTR 174.224.125.74.in-addr.arpa
8    0.262071    192.168.2.6    68.105.28.12    DNS    86    Standard query PTR 39.227.125.74.in-addr.arpa
31    0.840231    68.105.28.12    192.168.2.6    DNS    272    Standard query response PTR lax02s01-in-f14.1e100.net
29    0.825752    68.105.28.12    192.168.2.6    DNS    270    Standard query response PTR dfw06s06-in-f7.1e100.net
 My friend suggested nscd (name service cache daemon) which was installed, but not active... I looked around for more information on it and it seemed to be more for authentication caching than DNS caching.

I googled for DNS caching on arch and I found pdnsd

Set it up according to the wiki, with a few tweaks, systemctl enable and reboots later... the DNS flood is over.

Yay.

Saturday, January 28, 2012

dhcpcd being a bastard and how to manually configure with iproute2 suite

Hello, and welcome to the next installation of my adventures with Arch Linux!

I got lucky on installation day and got dhcpcd to work a few times, but today was another story.
I looked at what was going on with wireshark, and it seems like dhcpcd was sending out dhcp requests, the router was replying with dhcp ack, however, dhcpcd would just request again... and again... maybe I'll get around to actually debugging dhcpcd, but until then:
HOW TO CONFIGURE YOUR INTERFACE WITH iproute2!
So, you obviously know that Arch has deprecated the old net-tools (ifconfig, route, etc) and is using iproute2 as the standard network configuration suite.

tl;dr this is how I configured my interface to work with a standard home router:
ip addr add 192.168.1.66/24 dev eth0
this assigns an ip address (192.168.1.66) with a subnet mask (255.255.255.0) to the eth0 interface.
Now, we want to add a default route:
ip route add default via 192.168.1.1
Cool! Now we need a DNS server, and we should be set. Modify the /etc/resolv.conf to contain the nameserver directive of your DNS server of choice:
# Generated by dhcpcd
# /etc/resolv.conf.head can replace this line
nameserver 68.105.28.12
# /etc/resolv.conf.tail can replace this line
That's my entire resolv.conf file, I use a COX dns server (because I have that IP memorized for some reason) but you could use the great OpenDNS:
208.67.222.222
208.67.220.220


*EDIT*
You will want to edit your /etc/rc.conf file for static ip vs. DHCP if you need to.  Seems like lots of people are having issues with the new dhcpd.

Friday, January 27, 2012

Installing Arch

My experience installing Arch Linux.
Today I installed Arch Linux, I was attracted to it by its philosophy of simplicity (leave it up to the user/admin what to install) and it's rolling releases (I love bleeding edge stuff, hipster alert)

Let me sing you the song of my people.

  1. Put in the Arch Linux cd with the "Netinstall Image" burned to it, booted it. And went through the steps.
  2. I ran into an error after going through and selecting a bunch of packages to download -- something like "Ruby depends on yacc, cannot resolve dependency" -- This sucked. "At least I was penning down all my pacakge selections"  I thought and figured I should just install a bare bones system anyway and install everything I want AFTER I got the system up and running.

    I selected these main packages (which installed without error):
    *base
    *xfce4
    *xorg
    *xorg-drivers
    *xorg-apps
    *xorg-fonts
  3. It booted to a login prompt "login:" which I used root/password and could start xfce4 with "startxfce4"
  4. And began install packages and configuring stuff, its best to do each package one at a time so you can alter the configuration files as needed.
Here's the list of packages I've installed so far (using pacman -S package_name):
  • vim
  • firefox
  • pidgin
  • xdg-utils (this fixed an error when clicking links in pidgin)
  • sudo
  • flashplayer
  • gimp
  • audacious
  • gstreamer0.10-plugins(this is a group of 6 packages including the good, bad, ugly)
  • mplayer
  • mirage
  • wireshark
  • nodejs
  • slim(this is the login manager I chose)
and I've removed:
  • vi
  • nano
I've added these lines to /etc/rc.local
#remove pc speaker kernel module
rmmod pcspkr

#command aliases
alias vi='vim'
alias python='python2'
alias ll='ls -l'
alias la='ls -a'
and /etc/rc.conf was kept default from the initial settings besides this line:
DAEMONS=(syslog-ng network crond slim dhcpcd)
We added slim and dhcpcd (networking is a pain during the install, I had to run dhcpcd (got lucky from autocomplete trying to run 'dhclient') in another tty.)

This was error that gave me trouble:
[root@none etc]# pacman -Q node.js
warning: database file for 'community' does not exist
error: package 'node.js' was not found
I fixed it by running: pacman -Syy
which does a Sync and yy refreshes the database files from the server (even if they appear up to date).

That's it for now. Going to restart now to see if that DAEMONS line will work. Godspeed you black emperor!

*EDIT*
I've realized its not really a good idea to add stuff to rc.local ...instead I put that stuff in /etc/bash.bashrc

rc stands for "run command" on start (something like that, there's lots of arguments)

*EDIT2*
My DAEMONS line looks like this now: DAEMONS=(syslog-ng network crond alsa)

Because dhcpd is broken for me (and it seems like some others, I should look into fixing/making a proper bug report now that I'm using arch on a laptop... )