Este laboratorio fue de mucho provecho, principalmente porque hice algo que siempre habia querido hacer.
Voy a copiar aqui las intrucciones del laboratorio para que las vean.
###############################################
Scope of the Challenge
each group is owning a cafè, some customers expressed interest in having access to Internet for email and web
- few customers own a laptop, some doesn't and would like to use a Window box provided in the cafè, but others like Linux more than Windows...
- customers are concerned about security, they don't want viruses/attacks on their laptops, they don't want others to read what they are doing...
there is a wireless ISP in the town (it's Galileo Town, by the way): RobNet (the hacker-friendly ISP ;-), at some conditions:
- The ISP offers subscription for a BASIC plan for cybercafès: TCP/IP connection to its AP (5GHz), static IP is assigned to each customer, no other features included...
there is a Shop in the town, offering networking gear at good price (they always say so, never trust them ;-):
- The "Carlo and Sebastian" shop sells: AP, wireless clients, WiFi antennas, UTP cables, Ethernet switches, PoE and power supplies, and maybe other stuff...
- each visit to the shop has a price (long trip to go there): 20 points
- each item has a price (the actual currency is the "POINTS"), according to the price list:
PRICELIST:
- Linksys AP: 50 points
- Ubiquity Nano Station (5Ghz): 60 points
- Ubiquity Nano Station (2.4Ghz): 50 points
- Ubiquity Bullet (2.4GHz): 30 points
- Ubiquity Bullet (5GHz): 40 points
- Dual band omni antenna: 15 points
- 2.4GHz patch antenna with cable: 25 points
- 5GHz high-gain antenna with cable: 60 points
- N adapter: 5 points
- pigtail: 15 points
- PoE injector: 10 points
- Power supply: 10 points
- short UTP cable: 2 point
- long UTP cable: 4 points
- Ethernet Switch (8 ports): 25 points
- Ethernet Switch (16 ports): 35 points
- consultacy for wireless (2 questions, Rob, Sebastian, Carlo, Struzak): 75 points
- consultacy for networking (2 questions, Christian, Rob, Sebastian, Carlo): 75 points
- consultancy for security (2 questions, Christian, Rob, Sebastian, Carlo): 150 points
- other items are available on request, ask a quotation for purchase or rent... (by phone call, it costs 5 points)
- software is available upon request, ask for consultancy in you need it...
###############################################
Entonces el que lograra hacer el cafe correctamente y con menos gastos GANA.
Aunque el grupo es teoricamente de 11 integrantes, 2 de ellos NUNCA han tocado el equipo o hecho por donde trabajar. De los 9 restantes hay varios que trabajan mas como en politica que practica entonces observan mas que trabajar.
Los 9 restantes nos separamos en 3 grupos.
Marcial, Lolit. Linux Router and Firewall
Anthony, Bett, Don, Shoban. WAN Link (5GHz)
Sharmin, Kavita, Reggie. Wireless LAN (2.4GHz)
La parte del WAN no era muy complicada ya que solamente se requiere entrar a la configuracion web del NanoStation y solicitar conectarse al enlace de RobNet.
La parte del Wireless LAN era mas sencilla (y fue la que mas fallo) solamente se necesitaba crear una red con WAP o WEP con un ESSID perteneciente al grupo y luego revisar que todo funcionara. Se les complico demasiado hacer que el router hiciera NAT y que funcionara como DHCP server, no se porque.
En cuanto al router de Linux se tuvieron que hacer muchas cosas.
- Modificar el archivo /etc/network/interfaces para que cuando levantara las tarjetas de red las configurara con IP statica y cargara las reglas del firewall sobre la interface externa de la red.
- Se habilito ip forwaring en el archivo /etc/sysctl.conf
- La routa estatica fue cambiada a mano porque no me dio tiempo de buscar en cual archivo se debia hacer. Para hacerlo permanente se debe usar en el mismo archivo una linea de la forma "up route add default gw x.x.x.x".
- Se intalo el dnsmasq para que funcionara como servidor de DHCP. Esto no funciono bien cuando se tenian cargadas las reglas del firewall aunque se tenia que funcionara con el puerto 67 y 68 abiertos.
- Se escribieron las reglas del firewall entre las cuales se tenian:
/etc/iptables.up.rules
*nat
:PREROUTING ACCEPT [11:2434]
:POSTROUTING ACCEPT [25:2518]
:OUTPUT ACCEPT [33:3415]
-A POSTROUTING -o eth0 -j MASQUERADE
COMMIT
*filter
:INPUT ACCEPT [36821:31028278]
-A INPUT -p ICMP -j ACCEPT
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p tcp --dport 80 -j ACCEPT
-A INPUT -p tcp --dport https -j ACCEPT
-A INPUT -p tcp --dport 25 -j ACCEPT
-A INPUT -p tcp --dport 53 -j ACCEPT
-A INPUT -p udp --dport 53 -j ACCEPT
-A INPUT -p udp --dport 67 -j ACCEPT
-A INPUT -p udp --dport 68 -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -j DROP
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [32863:8056883]
COMMIT
Despues de esto la configuracion debe funcionar correctamente.