To prevent the occurrence of an illegal access to a local area network from the external by switching and connecting a local area network (LAN) or a line to a computer by a switch.
The switch 1 switches and connects the LAN or a line (e.g. a telephone line) to the computer 2. Namely LAN connecting operation is normally executed, and at the time of going-out/returning from/to a home (company) or the like, the switch 1 is switched to line connecting operation. At the time of returning to the home (company), the line connecting operation is switched to the normal LAN connecting operation. Since either one of formats for connecting the LAN to the computer 2 to use the computer 2 and connecting the line to the computer 2 to use the computer 2 is used, an illegal access from the external to the LAN through the line and the computer 2 is disabled.