PND4

/dev/notes

Hostapd

Wireless access point daemon

Karma a version of hostapd for creating rogue access points.

NAT or Bridge

IP's must be handed out to the connecting clients so one or the other must be configured

  • NAT - creates a new subnet ".. with IP forwarding/masquerading and DHCP service (wireless clients will use a dedicated subnet, data from/to that subnet is NAT-ted – similar to a normal WiFi router that's connected to your DSL or cable modem)" – Archwiki > see the Firewalls article
  • Bridge - ".. Simple, but it requires that any service that's needed by your wireless clients (like, DHCP) is available on your computers external interface. That means it will not work if you have a dialup connection (e.g., via PPPoE or a 3G modem) or if you're using a cable modem that will supply exactly one IP address to you via DHCP." –ArchWiki > You need to create a network bridge and add your network interface (e.g. eth0) to it. You should not add the wireless device (e.g. wlan0) to the bridge; hostapd will add it on its own. > >If you use netctl, see Bridge with netctl for details (just do not add tap0 used in that example).

Configuration

System configuration is stored in /etc/hostapd/hostapd.conf.

To override at runtime: sudo hostapd /path/to/hostapd.conf

General use, non-Karma, WPA/WPA2 config
From nims.wordpress.com

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#sets the wifi interface to use, is wlan0 in most cases
interface=wlan0
#driver to use, nl80211 works in most cases
driver=nl80211
#sets the ssid of the virtual wifi access point
ssid=dontMessWithVincentValentine
#sets the mode of wifi, depends upon the devices you will be using. It can be a,b,g,n. Setting to g ensures backward compatiblity.
hwmode=g
#sets the channel for your wifi
channel=6
#macaddracl sets options for mac address filtering. 0 means "accept unless in deny list"
macaddracl=0
#setting ignorebroadcastssid to 1 will disable the broadcasting of ssid
ignorebroadcastssid=0
#Sets authentication algorithm
#1 - only open system authentication
#2 - both open system authentication and shared key authentication
authalgs=1
 
#####Sets WPA and WPA2 authentication#####
#wpa option sets which wpa implementation to use
#1 - wpa only
#2 - wpa2 only
#3 - both
 wpa=3
#sets wpa passphrase required by the clients to authenticate themselves on the network
 wpapassphrase=KeePGuessinG
#sets wpa key management
 wpakeymgmt=WPA-PSK
#sets encryption used by WPA
 wpapairwise=TKIP
#sets encryption used by WPA2
 rsnpairwise=CCMP

#################################
#####Sets WEP authentication##### #WEP is not recommended as it can be easily broken into wep
defaultkey=0 wepkey0=qwert #5,13, or 16 characters #optionally you may also define wepkey2, wepkey3, and wep_key4
################################# #For No encryption, you don't need to set any options

non-Karma w/ WPA2

1
2
3
4
5
6
7
8
9
10
11
12
interface=tpl0
driver=nl80211
ssid=2WIRE022
hwmode=g
channel=10
macaddracl=0
authalgs=1
ignorebroadcastssid=0
wpa=2
wpapassphrase=SecretPassword1234
wpakeymgmt=WPA-PSK
rsn_pairwise=CCMP

Karma w/ WEP

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# config file to use with the Karma'd version of hostapd
# created by Robin Wood - robin@digininja.org - www.digininja.org

interface=tpl0
driver=nl80211
countrycode=US

ssid=AndroidAP
channel=3

wepdefaultkey=0
wepkey0=SecretPassword1234

# Both open and shared auth
authalgs=3

# no SSID cloaking
ignorebroadcastssid=0

# -1 = log all messages
loggersyslog=-1
loggerstdout=-1

# 2 = informational messages
loggersysloglevel=2
loggerstdoutlevel=2

# Dump file for state information (on SIGUSR1)
# example: kill -USR1 <pid>
dumpfile=/tmp/hostapd.dump
ctrlinterface=/var/run/hostapd
ctrlinterfacegroup=adm

# 0 = accept unless in deny list
macaddracl=0

# only used if you want to do filter by MAC address
acceptmacfile=/etc/hostapd/hostapd.accept
denymacfile=/etc/hostapd/hostapd.deny

# Finally, enable Karma
enablekarma=0

# Black and white listing
# 0 = white
# 1 = black
karmablack_white=1

Useful links and references

ArchWiki: Software Access Point

Octopress

Markdown blogging platform built on Ruby.

Installation

First install ruby. Then clone repo

git clone git://github.com/imathis/octopress.git octopress
cd octopress

Install dependencies

sudo gem install bundler
bundle install # make sure to run this one in the 'octopress' directory

Install default theme

rake install

Useful Links and References

Octopress.org

Jekyll Docs

BigdinosaurBlog: Changing Octopress' Header

GIT Version Control System

Starting a new repo

create project directory

mkdir -p <folder>
cd <folder>

create files or copy them from existing project.

touch README.md

initialize barebone git files

git init

prepare commit with annotations and files

git add README.md
git commit -m "<message>"

new project, so create remote origin, and master branch

git remote add origin <url | git@github.com:pnd4/<project>.git"

publish files to the new git-repository

git push -u origin master

Tips from the IRC guys

Excerpt from: freenode#crunchbang-offtopic20130929.log

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
[00:04:25] <Ferus> also thats why you git pull
[00:04:28] <Ferus> all the time
[00:04:29] <Ferus> lel
[00:04:33] <orik> xD
[00:04:57] * Ferus passes pnd4 an american spirit black
[00:04:59] <pnd4> hmm whats the diff between git pull and clone?
[00:05:00] <orik> well phoronix even has good things to say about mpv
[00:05:10] <orik> a pull just checks for changes and
[00:05:19] <Ferus> clone clones a new repo, pull pulls the new changes from master
[00:05:26] <orik> ^^
[00:05:27] <pnd4> oh ok.. thanks
[00:05:50] <orik> man I've been using git at work for the past three months and I swear I still don't fully understand it
[00:05:56] <Ferus> tl;dr if the repo doesnt exist locally, you clone from master, if it does exist locally, you pull from master
[00:06:19] <Ferus> orik: i've been using git for two years, i broke my repo 5 months ago and havent fixed it
[00:06:34] <Ferus> (i dont know how ;_;)
[00:07:41] <pnd4> ok so Ive cloned dwmstatus earlier, made changes. if I do a pull, does it undo my changes to match the current master?
[00:07:52] *** Joins: salam4ik (~salam4ik@89.106.233.158)
[00:08:10] * pnd4 copies directory and just tries it.. 'banzai!'
[00:08:21] <Ferus> no, it'll complain that you have un-stashed changed
[00:08:23] <Ferus> changes*
[00:08:39] <Ferus> so you want to do git stash; git pull; git stash pop
[00:09:05] <pnd4> stash, thats a new one too.. did I mention I'm quite new to git ? haha.
[00:09:17] <Ferus> (this is all i know how to do)
[00:09:27] <Ferus> besides add and rm, but thats kinda obvious
[00:09:44] <pnd4> thanks. I'll try and remember that if/when suckless puts out a new version
[00:10:49] <pnd4> I think having familiarity with git should help in the job search.. I mean, who wouldn't want a guy that's familiar with widely used version control systems?
[00:10:49] <Ferus> you can always google it
[00:11:46] <pnd4> that is true, but the tl;dr versions are always nice
[00:12:52] <pnd4> Halts: ebay has the hat I want for 25 (down from 35$) .. they're out of my size.. I share your pain.
[00:14:05] <pnd4> its like that scene in 'The Last Samurai' where they cut his hair
[00:15:40] <Halts> at least you can buy your hat.
[00:16:01] <pnd4> would you buy your jersey still if it was 120 ?
[00:16:59] <Ferus> > IP Location: Kingston / New York / United States
[00:17:08] <Ferus> bahaha this site is horrible, cant even geolocate
[00:18:22] <Halts> haha, not right now.
[00:18:28] <Halts> but I eventually would, yes.
[00:18:40] <Halts> I'd like to get it for
[00:18:50] <Halts> but, a bunch of cunts ruined that
[00:19:57] *** Quits: orik (~orik@50-46-134-47.evrt.wa.frontiernet.net) (Remote host closed the connection)
[00:20:51] <n2o4> pnd4: Just checkout your features into it's own branch, for example git clone foobar, git checkout -b my-super-branch, make edits and commit, issue git checkout master to check into the master branch again.

Useful Links and References

  1. GitHub