1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Same funtionality with SSH as with the web interface?

Discussion in 'Sveasoft Firmware' started by fasttech, Aug 18, 2005.

  1. fasttech

    fasttech Network Guru Member

    I’m planning to remove the Sveasoft web interface from the router for security purpose.
    Therefore I will need to able to control the router using SSH. Can this be done and how hard is it? Is there any commands for SSH, that will give me same functionally as with the web interface?

    Regards
    Christian
     
  2. littlewhoo

    littlewhoo Network Guru Member

    Yes, everthing that can be done with the webinterface (and much more), can be done via SSH/command shell. It's easy if you have experience with Linux. If you only know Windows, it's probably not that easy.

    Well, actually there are dozens of useful commands.

    First you should read a bash tutorial, to get some basic knowledge about shell commands and scripting in Linux:
    http://www.tldp.org/LDP/abs/html/

    Most firmware flavours for the WRT54G are using busybox. So getting some additional information about the various busybox commands might also be useful:
    http://www.busybox.net/downloads/BusyBox.html

    All the firewall/port forwarding/port triggering stuff is done with iptables. So if you want to do this via SSH/command shell, it's advisable to read this iptables tutorial:
    http://iptables-tutorial.frozentux.net/iptables-tutorial.html

    Sed and Awk knowledge (and knowledge about regular expressions in general) might also come in quite handy):
    http://www.grymoire.com/Unix/Sed.html
    http://www.vectorsite.net/tsawk.html

    The WRT54G is saving all permanent settings in NVRAM. So you'll need the nvram command. Searching for "nvram show", "nvram get", "nvram set" here in the forum should give you pleanty of examples how to use it.

    Do also a search for "rc_startup" and "rc_firewall". These are two special nvram parameters, that you'll need for premanently storing startup scripts and iptables rules.

    I guess this should be enough for the beginning. :)
     

Share This Page