A method for a terminal to traverse a private network to communicate with a server in an internet protocol multimedia subsystem, IMS, core network, comprising: setting, by the terminal, a source address of service data to be sent as a virtual IP address, setting a destination address of the service data to be sent as an address of the server to obtain a first service packet, wherein the terminal is located in the private network, the virtual IP address is an address allocated by the IMS core network to the terminal; encapsulating, by the terminal, the first service packet into a first tunnel packet, wherein a source IP address of the first tunnel packet is a real IP address of the terminal, and a destination IP address of the first tunnel packet is an IP address of a security tunnel gateway, the security tunnel gateway is located at the edge of the IMS core network; and sending, by the terminal, the first tunnel packet to the security tunnel gateway over a virtual private network, VPN, tunnel between the terminal and the security tunnel gateway, so that the security tunnel gateway sends the first service packet in the first tunnel packet to the server; the method characterised in that: the VPN tunnel between the terminal and the security tunnel gateway is a User Datagram Protocol, UDP, tunnel; and in that a Security Socket Layer, SSL, tunnel exists between the terminal and the security tunnel gateway additionally, the method further comprising: sending, by the terminal, first service control information to the security tunnel gateway over the SSL tunnel, the first service control information is a request for allocating the virtual IP address; receiving, by the terminal, second service control information sent by the security tunnel gateway over the SSL tunnel, the second service control information is the virtual IP address allocated by the security tunnel gateway to the terminal. setting, by the terminal, a source address of service data to be sent as a virtual IP address, setting a destination address of the service data to be sent as an address of the server to obtain a first service packet, wherein the terminal is located in the private network, the virtual IP address is an address allocated by the IMS core network to the terminal; encapsulating, by the terminal, the first service packet into a first tunnel packet, wherein a source IP address of the first tunnel packet is a real IP address of the terminal, and a destination IP address of the first tunnel packet is an IP address of a security tunnel gateway, the security tunnel gateway is located at the edge of the IMS core network; and sending, by the terminal, the first tunnel packet to the security tunnel gateway over a virtual private network, VPN, tunnel between the terminal and the security tunnel gateway, so that the security tunnel gateway sends the first service packet in the first tunnel packet to the server; the method characterised in that: the VPN tunnel between the terminal and the security tunnel gateway is a User Datagram Protocol, UDP, tunnel; and in that a Security Socket Layer, SSL, tunnel exists between the terminal and the security tunnel gateway additionally, the VPN tunnel between the terminal and the security tunnel gateway is a User Datagram Protocol, UDP, tunnel; and in that a Security Socket Layer, SSL, tunnel exists between the terminal and the security tunnel gateway additionally, sending, by the terminal, first service control information to the security tunnel gateway over the SSL tunnel, the first service control information is a request for allocating the virtual IP address; receiving, by the terminal, second service control information sent by the security tunnel gateway over the SSL tunnel, the second service control information is the virtual IP address allocated by the security tunnel gateway to the terminal.