First, you should set a password for the root account (which also
will enable SSH). Telnet into the router, and run
The next thing you need to do is set up your network interfaces. Modify /etc/config/network to look similar to this:
config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option ifname 'eth0' option type 'bridge' option proto 'static' option ipaddr '192.168.2.111' option netmask '255.255.255.0' option gateway '192.168.2.1' list dns '192.168.2.1' list dns '22.214.171.124'
assuming that the router's IP address will be 192.168.2.111 and your gateway is at 192.168.2.1.
Next, modify the beginning of the firewall config file (/etc/config/firewall) to look like this:
config defaults option syn_flood '1' option input 'ACCEPT' option output 'ACCEPT' option forward 'ACCEPT' #Uncomment this line to disable ipv6 rules # option disable_ipv6 1 config zone option name 'lan' option network 'lan' option input 'ACCEPT' option output 'ACCEPT' option forward 'ACCEPT' config zone option name 'wan' option network 'wan' option input 'ACCEPT' option output 'ACCEPT' option forward 'ACCEPT' option masq '1' option mtu_fix '1'
Leave the rest of the file untouched.
In /etc/config/wireless, find the line that reads "option disabled" and change it to "option disabled 0" to enable wireless. At this point, you need to reboot the router.
Now, connect a FAT32-partitioned USB Flash drive to the router, and run the following commands on the router:
cd /tmp wget http://piratebox.aod-rpg.de/piratebox_0.3-2_all.ipk opkg update && opkg install piratebox*
When you restart the device, you should see a new wireless network called "PirateBox - Share Freely". Plug your router in to a USB battery, and place everything into an enclosure of some kind (preferably something black with the Jolly Roger emblazoned on the side). Congratulations! With little to no hassle, you've created a mobile, anonymous sharing device!
Using the PirateBox
The point of the PirateBox is to be integrated easily into a public space with zero effort on the part of the end user; otherwise, no one ever would use it! This means using it has to be incredibly simple, and it is. If you are connected to the "PirateBox - Share Freely" network and you try to open a Web page, you automatically will be redirected to this page (Figure 1).
Figure 1. PirateBox Home Screen
As you can see, you are given choices as to what you wish to do: browse and download files, upload files or chat with other users—all of which is exceedingly easy to do. Go build your own PirateBox and get sharing!
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems
Join editor Bill Childers and Bit9's Paul Riegle on April 27 at 12pm Central to learn how to keep your Linux systems secure.
Free to Linux Journal readers.Register Now!
|Security Hardening with Ansible||Aug 18, 2014|
|Monitoring Android Traffic with Wireshark||Aug 14, 2014|
|IndieBox: for Gamers Who Miss Boxes!||Aug 13, 2014|
|Non-Linux FOSS: a Virtualized Cisco Infrastructure?||Aug 11, 2014|
|Linux Security Threats on the Rise||Aug 08, 2014|
|Android Candy: Oyster—Netflix for Books!||Aug 07, 2014|
- Security Hardening with Ansible
- NSA: Linux Journal is an "extremist forum" and its readers get flagged for extra surveillance
- Readers' Choice Awards 2013
- Monitoring Android Traffic with Wireshark
- Tech Tip: Really Simple HTTP Server with Python
- RSS Feeds
- Returning Values from Bash Functions
- New Products
- IndieBox: for Gamers Who Miss Boxes!
- Kernel Korner - Why and How to Use Netlink Socket