Howto OpenWRT: Unterschied zwischen den Versionen

Aus Weimarnetz Wiki
Zur Navigation springen Zur Suche springen
(added some links to ipkg-building (anybody interested in that?))
Zeile 15: Zeile 15:
 
#Grab a [http://openwrt.org/downloads/snapshots/ snapshot] of a pre-compiled firmware
 
#Grab a [http://openwrt.org/downloads/snapshots/ snapshot] of a pre-compiled firmware
 
#Follow the instructions from [http://openwrt.org/userguide.html#before_you_flash here]
 
#Follow the instructions from [http://openwrt.org/userguide.html#before_you_flash here]
 +
 +
===Connect to the Linksys via telnet===
 +
OpenWRT by default installs telnet on the Linksys. To access it you need a telnet client, which is installed on most Operating Systems by default. Connect your computer to one of the LAN-Ports on the back of the Linksys. To open a telnet-connection:
 +
 +
*on Windows: -->Startmenu-->Ausführen--> telnet 192.168.1.1
 +
*on MacOSX: ??
 +
*on Linux: telnet 192.168.1.1
 +
 +
There is no login/pass on telnet. You can now start to configure the linksys to your demands. To close the connection do "CTRL-D"
 +
 +
===Networkconfiguration===
 +
Before you can install new software on the linksys, you will need to connect it to the internet. For this howto we will assume that you have access to the internet via a LAN.
 +
Connect the WAN-interface of the Linksys with a cable to the network. To configure the WAN-interface of the router, issue the following commands:
 +
 +
  '''nvram get wan_ifname'''  (this will print the name of the WAN interface)
 +
  '''ifconfig <name-of-WAN-interface> xxx.xxx.xxx.xxx''' (put in an ip used on the LAN)
 +
  '''route add default gw xxx.xxx.xxx.xxx''' (put in the ip of the gateway)
 +
  '''echo 141.54.1.1 >> /etc/resolv.conf'''  (this configures the nameservers)
 +
  '''ping subsignal.org''' (to test if it works, abort with CTRL-C)
  
 
===Install ssh (dropbear)===
 
===Install ssh (dropbear)===
 +
Telnet is by design very insecure, a far better way of configuring the router is ssh. there is a ssh-server for OpenWRT available, its name is dropbear. you can use the "ipkg" tool to install it. login to the linksys using telnet and issue the following commands:
 +
 +
  '''ipkg update'''  (this will get a list of available software from the internet)
 +
  '''ipkg install dropbear''' (installs the dropbear-package)
 +
 +
To set the root-password:
 +
  '''passwd'''
 +
 +
After restarting the router you can login via ssh.
 +
* on linux: ssh 192.168.1.1
 +
* MacOSX: open a console, and type ssh 192.168.1.1
 +
* On Windows you will need a seperate ssh-client, [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html putty] is a good one. Type 192.168.1.1 into the address field, select ssh as protocol and press connect.
 +
 +
Login with username: root and pass: whatever you chose as root-password. If this works, you can now safely stop the insecure telnet service:
 +
 +
  '''rm /etc/init.d/S41Telnet'''
  
 
==Configuring the network==
 
==Configuring the network==

Version vom 31. Oktober 2004, 19:18 Uhr


Howto install the OpenWRT-Firmware on a Linksys WRT54g

Introduction

OpenWRT is a highly configurable firmware for the WRT54G. It provides different packages for diverse functionalities. This howto will cover the basic installation of the firmware, as well as some specific configurations.

Other Sources

There are several howtos for OpenWRT on the net:

  1. OpenWRT userguide
  2. Howto on funkfeuer.at, vienna wireless

Basic Install

The basic installation is documented on the OpenWRT homepage, in the userguide section. In most cases you can skip the part about compiling from source.

  1. Grab a snapshot of a pre-compiled firmware
  2. Follow the instructions from here

Connect to the Linksys via telnet

OpenWRT by default installs telnet on the Linksys. To access it you need a telnet client, which is installed on most Operating Systems by default. Connect your computer to one of the LAN-Ports on the back of the Linksys. To open a telnet-connection:

  • on Windows: -->Startmenu-->Ausführen--> telnet 192.168.1.1
  • on MacOSX: ??
  • on Linux: telnet 192.168.1.1

There is no login/pass on telnet. You can now start to configure the linksys to your demands. To close the connection do "CTRL-D"

Networkconfiguration

Before you can install new software on the linksys, you will need to connect it to the internet. For this howto we will assume that you have access to the internet via a LAN. Connect the WAN-interface of the Linksys with a cable to the network. To configure the WAN-interface of the router, issue the following commands:

  nvram get wan_ifname  (this will print the name of the WAN interface)
  ifconfig <name-of-WAN-interface> xxx.xxx.xxx.xxx (put in an ip used on the LAN)
  route add default gw xxx.xxx.xxx.xxx (put in the ip of the gateway)
  echo 141.54.1.1 >> /etc/resolv.conf  (this configures the nameservers)
  ping subsignal.org (to test if it works, abort with CTRL-C)

Install ssh (dropbear)

Telnet is by design very insecure, a far better way of configuring the router is ssh. there is a ssh-server for OpenWRT available, its name is dropbear. you can use the "ipkg" tool to install it. login to the linksys using telnet and issue the following commands:

 ipkg update  (this will get a list of available software from the internet)
 ipkg install dropbear (installs the dropbear-package)

To set the root-password:

  passwd

After restarting the router you can login via ssh.

  • on linux: ssh 192.168.1.1
  • MacOSX: open a console, and type ssh 192.168.1.1
  • On Windows you will need a seperate ssh-client, putty is a good one. Type 192.168.1.1 into the address field, select ssh as protocol and press connect.

Login with username: root and pass: whatever you chose as root-password. If this works, you can now safely stop the insecure telnet service:

  rm /etc/init.d/S41Telnet

Configuring the network

Ad-hoc networking

Accesspoint (AP)

AP-Client

Further Resources

.. to be continued