PCs Labs - Windows

Todos os PCs dos labs têm um script de login a correr para eliminar o conteúdo de certas pastas do User student cada vez que o mesmo faz login. Atualmente, esse script está configurado da seguinte forma:

1. A localização da configuração do script é: C:\Windows\System32\GroupPolicyUsers\S-1-5-32-545\User\Scripts

2. O script em si está guardado em C:\Default Images

Router RB433 UAH

Install OpenWRT (macOS Catalina 10.15.7 e versão 18.06.8 do OpenWRT)

1. Intalar o dnsmasq recorrendo ao brew ou similar:

  • brew install dnsmasq

2. Criar dnsmasq symlink:

  • sudo ln -s /usr/local/opt/dnsmasq/sbin/dnsmasq /usr/local/bin/dnsmasq

3. Em System Preferences -> Network -> Ethernet deverá ser atribuído um IP fixo pertencente à rede 192.168.1.0/24 por exemplo 192.168.1.10 (não atribuir o 192.168.1.1 uma vez que este é o IP default do OpenWRT)

4. Ligar o RB433UAH ao Mac com o cabo por porta serie e aceder com um programa apropriado (por exemplo Serial) as definições são 115200 8N1. Ligar também a porta WAN por ethernet ao Mac.

5. Ligar a alimentação do Router e prestar atenção ao monitor serie, carregar em qualquer tecla para entrar no setup

6.

  • Formatar a NAND com a opção e (opcional)
  • Alterar o boot device com a opção o seguindo da opção 1 - boot Ethernet once, then NAND
  • Alterar o boot protocol com a opção p seguido da opção 2 - dhcp protocol
  • Carregar no x para sair do setup

O Router irá apresentar a mensagem: trying dhcp protocol.....

7. Correr o dnsmasq:

  • sudo dnsmasq -i en4 --dhcp-range=192.168.1.0,192.168.1.200 --dhcp-boot=openwrt.elf --enable-tftp --tftp-root=~/tftp/ -u user -d -p0 -K --log-dhcp --bootp-dynamic

As seguintes opções devem ser alteradas:

  • --dhcp-boot=openwrt.elf deverá corresponder ao nome do ficheiro vmlinux-initramfs.elf
  • --tftp-root=~/tftp/ deverá corresponder a um directório previamente criado onde o ficheiro vmlinux-initramfs.elf deverá ser colocado
  • -u user deverá corresponder ao nome do utilizador obtido com o comando whoami
  • -i deve ser o nome da interface de rede na qual se configurou o IP no passo 3.

8. O Router irá receber um endereço de IP e a transferencia deverá começar se não começar e continuar a aparecer ..... parar o dnsmasq e (ctrl+c) e correr de novo Se aparecer **** e não tiver a fazer load da imagem parar o dnsmasq e correr de novo também e a transferência será iniciada.

9. Após terminar o OpenWRT estará a correr na RAM do Router, terminar o dnsmasq com ctrl+c e mudar o cabo de rede da porta WAN para umas das portas LAN e aceder com o browser ao IP 192.168.1.1

10. Entrar com as credencias user: root e password em branco e aceder a System -> Backup / Flash Firmware no final da página em Flash Firmware selecionar o arquivo nand-large-squashfs-sysupgrade.bin que foi previamente descarregado e carregar em Flash. Através do monitor serie é possível ver o progresso da operação. No final o Router irá fazer boot pela NAND e tudo deverá estar certo.

NOTAS:

  • Não é possível correr a nenhuma versão posterior à 18.06.8 uma vez que dá kernel out of range ao tentar carregar o ficheiro vmlinux-initramfs.elf
  • O processo deverá funcionar de forma idêntica em Linux mas não foi testado
  • Só foi testado com os RB433UAH mas deverá funcionar com os restantes modelos

Ficheiros necessários: Attach:Arquivo.zip

Install OpenWRT (instruções antigas com as quais não tive sucesso...)

Nota: Atenção aos cabos de alimentação

1- Configurar o Putty

	velocidade: 115200

	COm5

2- Configurar Ip fixo PC

 - 10.0.0.1

 - 255.0.0.0

 - 10.0.0.1

3- Configurar a "bootloader" do router.

	-> Através do Putty após ligar o Router RB433 carregar "Enter" para entrar no "bootloader".

	-> No menu apresentado escolher a opção "e" para formatar a nand.

	-> Confirme "yes", através desta operação a nand será formatada

	-> Aparecerá novamente o mesmo Menu e ai deverá escolher a opção "o" ,boot device

	-> No submenu seguinte deve escolher a opção "e", boot over Ethernet, para que o Router faça boot a partir da rede

	-> De seguida no mesmo Menu seleccione "p",bootProtocol, e logo a seguir seleccione

		"2" para que o protocolo de boot seja o de DHCP.

	-> saia do Menu principal seleccionando "x".

4- Configurar o Servidor TFTPD32

   - Tftp Client

	-> Host: Ip deve coincidir com o Ip do Router respectivo (Verifique através do Mac Address)

	-> Local File: "C:\Programas\Tftpd32\openwrt-ar71xx-nand-vmlinux-initramfs.elf"

	-> Block Size: Default

	-> Activado o Put

 	-> Settings -> Bind TFTP to this address: 10.0.0.1

5- DHCP SERVER

	-> Server Interfaces: 10.0.0.1	

 	-> Settings -> IP pool starting address: 10.0.0.2

	    	    -> Size of pool: 10

	            -> Boot File:openwrt-ar71xx-nand-vmlinux-initramfs.elf

	            -> 0.0.0.0

	            -> 0.0.0.0

	            -> 255.0.0.0

	->Options: Ping address before assignation

	->Bind Dhcp to this address: 10.0.0.1

	->Persistant leases: not selected

6-> Por a correr no Pc o HFS com os ficheiros "openwrt-ar71xx-rootfs.tar.gz" e "openwrt-ar71xx-vmlinux.elf"

 -> na linha de comandos do putty

 -> "wget2nand http://10.0.0.1/"

 -> "reboot"

 -> caso ocorra o erro "tmp/wget2nand already exists" usar a instrução "rm -rf /tmp/wget2nand", refazendo a instrução "wget2nand http:\\10.0.0.1\"

5- Reconfigure o "bootloader" do router de forma a que esta inicie apartir da nand.

(Configuração alternativa - Funciona com bootloader 2.28) - OpenWRT - RB 433

Router RB600A

  • Install RouterOS

1- No site www.Mikrotik.com realizar o download da versão estável do RouterOS.

2- Ligar o PC ao Router R600 através de um cabo ethernet ou série.

3- Iniciar o Winbox e conectar-se com o R600.

4- Seleccionar a aba, "FILE" e arrastar o nova imagem do RouterOS para esta seccção.

5- Após este passo, fazer "REBOOT" ao router, para isso escolha a aba "System" e confirme a opção "REBOOT".

6- Quando o Router terminar a operação de reboot, apagar as configurações anteriores. Para isso

   seleccione a aba "New Terminal".

7- Neste novo terminal escreva a intrução seguinte: system reset-configurations no-default=yes

8- Após estas operações o WinBox deve indicar a nova versão do RouterOS com as definições de origem.

Cisco AirNet 1200 series

Run hyper terminal.

	* Speed=9600 bits per second (bps) 
	* Data bits=8 Stop bits=1 
	* Parity=None 
	* Flow Control=Xon/Xoff

Plug the console cable on the Cisco Aironet 1200 Series AP

Hold the Mode/Reset button of the Cisco Aironet 1200 then plug the power adapter

Hold down the reset/Mode button for 5 seconds then release.

This will provide you a dump on hyper terminal

As you can see on the dump this will provide a default IP address of 10.0.0.1

Just let it run and continue with the dump process

When it's finish press on enter

This will give you the prompt ap>

On ap> prompt enter this command

ap> enable

This will ask for a password in which the default is Cisco

Configuration mode is now enabled

ap#

Enter the following command to configure the terminal

ap# config term

The new prompt would be something like this

ap(config)#

Enter the following command to assign a new IP address to the access point

ap(config)# int bvi 1

ap(config)# ip address 10.0.0.1 255.255.255.0

You may run the end command to exit the configuration

ap(config)# end

Verify the assigned IP address

ap# show interface bvi 1

This will provide some information on this interface including the assigned IP address

ap#show interface bvi 1 BVI1 is down, line protocol is down Hardware is BVI, address is 001c.58a6.0ae3 (bia 0007.0e66.f000) Internet address is 10.0.0.1/24 MTU 1500 bytes, BW 54000 Kbit, DLY 5000 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation ARPA, loopback not set ARP type: ARPA, ARP Timeout 04:00:00 Last input never, output never, output hang never Last clearing of "show interface" counters never Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0 5 minute input rate 0 bits/sec, 0 packets/sec 5 minute output rate 0 bits/sec, 0 packets/sec 0 packets input, 0 bytes, 0 no buffer Received 0 broadcasts, 0 runts, 0 giants, 0 throttles 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort 48 packets output, 29664 bytes, 0 underruns 0 output errors, 0 collisions, 0 interface resets 0 output buffer failures, 0 output buffers swapped out

Config static IP 10.0.0.2 on PC interface

Plug the cross cable on the ethernet port then ping the device to verify the new assigned IP address

Now configuration process can be continued via HTTP access on the assigned IP address.

Username: Admin Password: Cisco

ASUS

Colocar ip estatico no pc: 192.168.1.2 Ligar o router. Assim que a luz de on/off desligar carregar no botão EZSetup até a luz on/off ficar a piscar fazer telnet 192.168.1.1

	* mount_root
	* passwd

Desligar e voltar a ligar. no webrouser ir a 192.168.1.1

If you want to COMPLETELY ERASE the JFFS2 partition, removing all packages, you can run:

	> firstboot

to begin erasing, and then:

	> sync

Instalar nova versao com x-wrt

http://x-wrt.org/

http://downloads.x-wrt.org/xwrt/kamikaze/8.09/brcm-2.4/default/openwrt-brcm-2.4-squashfs.trx

user: admin password: admin

RA-06 -> está OK -> canal 5

RA-02 -> está OK -> canal 2

RA-08 -> está OK -> canal 8

RA-03 -> está OK -> canal 12

Kamikaze (r17574) load 0.12 0.19 0.09 openwrt firmware

Cisco AirNet 1200 series

Run hyper terminal.

	* Speed=9600 bits per second (bps) 
	* Data bits=8 Stop bits=1 
	* Parity=None 
	* Flow Control=Xon/Xoff

Plug the console cable on the Cisco Aironet 1200 Series AP

Hold the Mode/Reset button of the Cisco Aironet 1200 then plug the power adapter

Hold down the reset/Mode button for 5 seconds then release.

This will provide you a dump on hyper terminal

As you can see on the dump this will provide a default IP address of 10.0.0.1

Just let it run and continue with the dump process

When it's finish press on enter

This will give you the prompt ap>

On ap> prompt enter this command

ap> enable

This will ask for a password in which the default is Cisco

Configuration mode is now enabled

ap#

Enter the following command to configure the terminal

ap# config term

The new prompt would be something like this

ap(config)#

Enter the following command to assign a new IP address to the access point

ap(config)# int bvi 1 ip address 10.0.0.1 255.255.255.0

You may run the end command to exit the configuration

ap(config)# end

Verify the assigned IP address

ap# show interface bvi 1

This will provide some information on this interface including the assigned IP address

ap#show interface bvi 1 BVI1 is down, line protocol is down Hardware is BVI, address is 001c.58a6.0ae3 (bia 0007.0e66.f000) Internet address is 10.0.0.1/24 MTU 1500 bytes, BW 54000 Kbit, DLY 5000 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation ARPA, loopback not set ARP type: ARPA, ARP Timeout 04:00:00 Last input never, output never, output hang never Last clearing of "show interface" counters never Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0 5 minute input rate 0 bits/sec, 0 packets/sec 5 minute output rate 0 bits/sec, 0 packets/sec 0 packets input, 0 bytes, 0 no buffer Received 0 broadcasts, 0 runts, 0 giants, 0 throttles 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort 48 packets output, 29664 bytes, 0 underruns 0 output errors, 0 collisions, 0 interface resets 0 output buffer failures, 0 output buffers swapped out

Config static IP 10.0.0.2 on PC interface

Plug the cross cable on the ethernet port then ping the device to verify the new assigned IP address

Now configuration process can be continued via HTTP access on the assigned IP address.

Username: Admin Password: Cisco


ASUS

Colocar ip estatico no pc: 192.168.1.2 Ligar o router. Assim que a luz de on/off desligar carregar no botão EZSetup até a luz on/off ficar a piscar fazer telnet 192.168.1.1

	* mount_root
	* passwd

Desligar e voltar a ligar. no webrouser ir a 192.168.1.1


Instalar nova versao com x-wrt

http://x-wrt.org/

http://downloads.x-wrt.org/xwrt/kamikaze/8.09/brcm-2.4/default/openwrt-brcm-2.4-squashfs.trx

user: admin password: admin

RA-06 -> está OK -> canal 5

RA-02 -> está OK -> canal 2

RA-08 -> está OK -> canal 8

RA-03 -> está OK -> canal 12

Fujitsu -> canal 7 -> RCM-A-2 -> 192.168.3.110

Cisco -> AP-02 ->canal 2 -> RCM-B-1 -> 192.168.2.108

Cisco -> AP-01 -> canal 13 -> RCM-A-2 -> 192.168.3.108

Iniciais

IPSEC

NAT

QOS

TOIP

VPN CLIENT

WIRELESS

DTN