Actions

Byzantium Live Distro CP

From HacDC Wiki

Revision as of 03:37, 14 July 2011 by Drwho (talk | contribs) (→‎ToDo)

Description

Browse source code.

Features

ToDo

Reorganize network configuration steps.

  • User goes to network configuration page (http://localhost:8080/network)
  • Generate list of network interfaces that can be configured.
    • For each interface, test the network.sqlite database and see if it's already configured.
    • If it is, change the color of the button corresponding to that interface.
    • Move already configured interfaces to another list?
  • User picks an interface.
  • If the interface is wired (/eth?/), user moves on to /network/tcpip
  • If the interface is wireless (/wlan?/), user moves on to /network/wireless
  • User sets the ESSID of the interface (default: Byzantium) and channel (default: 3)
  • User moves on to /network/tcpip
  • User either
    • enters an IP address and netmask
    • clicks the "pick a random address button"
      • note: the random IP address will be from RFC 1918.
      • note: the user will be advised to choose an RFC 1918 IP address.
  • If the user clicks "random", Network.randomip() is called.
    • A random integer 1 <= x <= 3 is generated.
      • 1: 10/8
        • ip_address[0] = 10
        • ip_address[1] = Random.randint(1, 254)
        • ip_address[2] = Random.randint(1, 254)
        • ip_address[3] = Random.randint(1, 254)
        • netmask = '255.0.0.0'
      • 2: 172.16/16
        • ip_address[2] = Random.randint(1, 254)
        • ip_address[3] = Random.randint(1, 254)
        • netmask = '255.255.0.0'
      • 3: 192.168/24
        • ip_address[2] = Random.randint(1, 254)
        • ip_address[3] = Random.randint(1, 254)
        • netmask = '255.255.255.0'
    • Note that we don't need cryptographically relevant random values for this. It's overkill. Also, it would deplete the entropy pool used by OpenSSL.
  • Display the user's chosen network configuration. Confirm:
  • If confirmed
    • Generate string to go into network.sqlite database
    • run iwconfig on the interface to set the ESSID and channel
    • run ifconfig on the interface to set the IP address and netmask
    • check return codes to detect success
    • add string to network.sqlite database