Racoon Roadwarrior Configuration - Page 4
Making a connection
In order to make a connection, first the VPN gateway should be set up. The firewall rules are set by running a shell script that was stored as fw.sh. After that, racoon is started with the following command.
VPN gateway is now ready and is waiting for the clients to initiate connection.
Racoon is then started on roadwarrior client with the following command.
# racoon -f /etc/racoon.conf
After racoon is active, it can be controlled using racoonctl tool. The connection is initiated by running the following command.
# racoonctl vc -u username 192.168.111.129
Username is a name of the one of the existing users on the VPN gateway. Racoonctl will ask for his password, and if the requested information are correct, client is presented with the information about assigned internal IP address, and a welcome message.
# racoonctl vc -u mac 192.168.111.129
Ping can now be run on the client side, trying to ping computer 192.168.112.131 that is inside the local network.
# ping 192.168.112.131
The connect: Resource temporarily unavailable message is normal. It is a message from the ping command trying to connect to the VPN gateway, which results in VPN gateway getting the information about needed SPs. When this information is available to VPN gateway, it sets needed SPs. If ping is repeated, as in example above, the computer is available and the connection is set up.
For checking of proper connection setup, traffic can be recorded by any available tool (Ethereal, tcpdump) while preforming the pinging. Traffic can be recorded on the route from roadwarrior client toward VPN gateway, as well as the traffic on the local network. On the outside network, ESP packets will be seen between the public IP addresses of the roadwarrior client and the VPN gateway. Inside these ESP packets are encapsulated ICMP Echo Request and ICMP Echo Reply packets between the assigned internal IP address of the roadwarrior client and the computer that is being pinged, which can be seen by recording packets on the local network. Also, if the roadwarrior client tries to ping some other computer on the Internet (192.168.111.3), traffic recording will show that the client sends ESP packets toward VPN gateway, and then VPN gateway sends ICMP Echo Request packet toward the pinged computer. When VPN gateway recieves the ICMP Echo Reply as an answer to his packet, VPN gateway encapsulates it into ESP and sends it back to the roadwarrior client. This shows that all the traffic towards Internet from the roadwarrior client passes through the VPN gateway, which is also used as a firewall protecting the local network. This shows that the roadwarrior client is considered as a part of the local network, all the time while the secure connection is running.
To disconnect from the VPN gateway, the following command is used on the roadwarrior client.
# racoonctl vd 192.168.111.129