The present invention has an object to provide a relay device capable of
performing dynamic port forward setting to open a port even if performing
a connection in two stages and being connected to a network and a port
forward setting method, and relates to a router for relaying a data
packet which has such a structure as to comprise a control portion for
giving a port forward setting request to an upper router 2 to perform the
port forward setting of the upper router 2 and to relate port forward
setting for a CP4 to port forward setting of a router upon receipt of the
port forward setting request from the CP4 when a WAN side I/F portion is
connected to an internet 1 through the upper router 2 and a LAN side I/F
portion is connected to the CP4.