Set up a new port forward on a Draytek Vigor over the telnet interface

I needed to add a new port forward to a router, but I did not have access to the web interface through a graphical browser. Attempts to get in using Lynx stalled as it seems the router will not serve up the frames in the interface independently of each other and it kept issuing 404 errors.

Either way I had to use the telnet interface using the following command (replace 192.168.1.1 23 with the IP address of your router):

telnet 192.168.1.1 23

This is fine except that Draytek have absolutely no documentation available for the commands. So to discover the correct command I had to go through all the available options (and sub options and sub sub options) as it was not immediately clear to me which option port forwarding was hiding under. To give you an idea here is a list of the top level options (run the `?` command to get this view):

> ?
% Valid commands are:
adsl         bpa          csm          webf         ddns         ddos
urlf         kw           exit         fe           internet     ip
ipf          log          mngt         port         portmaptime  prn
quit         show         srv          sys          tsmail       upnp
vigbrg       vlan         vpn          wan          wol          qos

The option we are interested in is `srv` which has a number of sub options but we are only interested in `nat`. Now we have yet more options but lets just stick with `portmap`.

Read More