A packet transfer apparatus is provided with: storage means configured to
store a predetermined search pattern and an address identifying a
predetermined apparatus; determination means configured to determine
whether predetermined data in a packet received from a network interface
matches the search pattern; determination means configured to determine a
network interface for outputting the packet using the determination
result; replacement means configured to replace an address identifying a
destination apparatus of the packet with an address identifying the
predetermined apparatus when outputting the packet from a network
interface connected to the predetermined apparatus; and packet sending
means configured to send the packet to the determined network interface.