A method for sending a data packet from a source (500, 600) in a local area network to a destination (570, 670) outside the LAN comprising the steps of: receiving (310, 520) a data packet enroute from the source (500, 600) in the LAN to the destination (570, 670); determining if the source (500, 600) in the LAN and the destination (570, 670) are members of a virtual private network, and if so: determining an encryption algorithm for messages sent between members of the virtual private network by accessing a portion of a memory that maintains information identifying various encryption algorithms to be utilized for data packets sent between members of various virtual private networks; determining a compression algorithm for messages sent between members of the virtual private network by accessing a portion of the memory that maintains information identifying various compression algorithms to be utilized for data packets sent between members of the various virtual private networks; executing (340, 530) the determined encryption algorithm on at least a payload portion of the data packet; executing (340, 530) the determined compression algorithm on at least the payload portion of the data packet; and forwarding (350, 530) the encrypted and compressed data packet to the destination (570, 670) outside the LAN. receiving (310, 520) a data packet enroute from the source (500, 600) in the LAN to the destination (570, 670); determining if the source (500, 600) in the LAN and the destination (570, 670) are members of a virtual private network, and if so: determining an encryption algorithm for messages sent between members of the virtual private network by accessing a portion of a memory that maintains information identifying various encryption algorithms to be utilized for data packets sent between members of various virtual private networks; determining a compression algorithm for messages sent between members of the virtual private network by accessing a portion of the memory that maintains information identifying various compression algorithms to be utilized for data packets sent between members of the various virtual private networks; executing (340, 530) the determined encryption algorithm on at least a payload portion of the data packet; executing (340, 530) the determined compression algorithm on at least the payload portion of the data packet; and forwarding (350, 530) the encrypted and compressed data packet to the destination (570, 670) outside the LAN. determining an encryption algorithm for messages sent between members of the virtual private network by accessing a portion of a memory that maintains information identifying various encryption algorithms to be utilized for data packets sent between members of various virtual private networks; determining a compression algorithm for messages sent between members of the virtual private network by accessing a portion of the memory that maintains information identifying various compression algorithms to be utilized for data packets sent between members of the various virtual private networks; executing (340, 530) the determined encryption algorithm on at least a payload portion of the data packet; executing (340, 530) the determined compression algorithm on at least the payload portion of the data packet; and forwarding (350, 530) the encrypted and compressed data packet to the destination (570, 670) outside the LAN.