This page guides us to setup a VPN connection between two ZyWALL routers. Please note that, in addition to ZyWALL to ZyWALL, ZyWALL can also talk to other VPN hardwards. The tested VPN hardware are shown below.
As the figure shown below, the tunnel between ZyWALL 1 and ZyWALL 2 ensures the packets flow between PC 1 and PC 2 are secure. Because the packets go through the IPSec tunnel are encrypted. To achieve this VPN tunnel, the settings required for each ZyWALL are explained in the following sections.
The IP addresses we use in this example are as shown below.
LAN 1 |
ZyWALL A | ZyWALL B | LAN 2 |
| 192.168.1.0/24 | LAN: 192.168.1.1 WAN: 202.132.154.1 |
LAN: 192.168.2.1 WAN: 168.10.10.66 |
192.168.2.0/24 |
Note: The following configurations are supposed both two VPN gateways have fixed IP addresses. If one of VPN gateways uses dynamic IP, we enter 0.0.0.0 as the secure gateway IP address. In this case, the VPN connection can only be initiated from dynamic side to fixed side to update its dynamic IP to the fixed side. However, if both gateways use dynamic IP addresses, please refer to Secure Gateway with Dynamic WAN IP Address for how to setup.
See the screen shot:

Similar to the settings for ZyWALL A, ZyWALL B is configured in the same way.
See the screen shot:

Q: How do we know the above tunnel works?
A: If the connection between PC 1 and PC 2 is ok, we know the tunnel works.
Please try to ping from PC 1 to PC 2 (or PC 2 to PC 1). If PC 1 and PC 2 can ping to each other, it means that the IPSec tunnel has been established successfully. If the ping fail, there are two methods to troubleshoot IPSec in ZyWALL.
Through SA monitor, you can monitor every IPSec connections running in ZyWALL presently. The third column of each entry indicates the IPSec rule name. So, if you can't see the name of your IPSec rule, it means that the SA establishment fails. Please go to SECURITY->VPN->VPN Rules to check your settings.
Please enter 'ipsec debug 1' in Menu 24.8. There should be lots of detailed messages printed out to show how negotiations are taken place. If IPSec connection fails, please dump 'ipsec debug 1' for our analysis. The following shows an example of dumped messages.
| ras> ipsec de type <0:Disable | 1:Original on|off | 2:IKE on|off | 3: IPSec [SPI]|on|off | 4:XAUTH on|off | 5:CERT on|off | 6: All> ras> ipsec de type 6 ras> ipsec de level <0:None | 1:User | 2:Low | 3:High> ras> ipsec de level 3 catcher(): recv pkt get_hdr(): nxt_payload<HASH> exch<ISAKMP Info>(5) m_id<0x9250B88D> len<68> isadb_get_entry(): nxt_pyld=<HASH>, exch=<ISAKMP Info> Old SA, sa->last_pyld=<HASH>, hdr.nxt_pyld=<HASH> sa->last_mid=0x9DDB9D5, hdr.m_id=0x9250B88D sa->last_len=52, hdr.len=68 catcher(): header ENCR_BIT set, mid=0x9250B88D conn_ent not exist yet hdr.exch<ISAKMP Info>(5) Peer starts new IPSec SA negotiation sa->state = <QM idle> create_conn_ent(): new conn_ent created sa->saIndex = 32768 proxy_src<192.168.1.0> proxy_src_mask<255.255.255.0> proxy_dst<172.22.3.83> proxy_dst_mask<172.22.3.83> proxy_src_proto_id<0> proxy_dst_proto_id<0> create_conn_ent(): done decryp_pyld(): len=40 alg<DES>, decrypt OK valid_pyld(): valid_pyld -- DEL(12) done |
4. View Log
To view the log for IPSec and IKE connections, please go to Logs->View Log,
select IKE from the Display drop down list. The
log menu is also useful for troubleshooting please capture it to ZyXEL support if necessary. The
example shown below is a successful IPSec connection.
