Please follow the below solution in case you get this error
# service ipsec restart failed to start openswan IKE daemon - the following error occured: can not load config '/etc/ipsec.conf': /etc/ipsec.conf:25: syntax error, unexpected KEYWORD, expecting $end [type]Solution:
Make sure that all the parameters inside ipsec.conf except 'conn', 'version' and 'config' are started after a TAB like as shown below
# vi /etc/ipsec.conf version 2.0 # conforms to second version of ipsec.conf specification # basic configuration config setup # Debug-logging controls: "none" for (almost) none, "all" for lots. # klipsdebug=none # plutodebug="control parsing" # For Red Hat Enterprise Linux and Fedora, leave protostack=netkey protostack=netkey nat_traversal=yes interfaces=%defaultroute oe=off # Enable this if you see "failed to find any available worker" nhelpers=0 #You may put your configuration (.conf) file in the "/etc/ipsec.d/" and uncomment this. conn sonicwall type=tunnel left=10.10.10.134 # Your local linux machine IP leftsubnet=10.10.10.0/24 # The subnet of your local Linux machine leftid=@GroupVPN # Same as given in Sonicwall leftxauthclient=yes right=xxx.xxx.xxx.xxx # Sonicwall VPN IP rightsubnet=192.168.0.0/24 # Sonicwall LAN subnet rightid=@xxxxxxxxxxx # Sonicwall Unique Identifier rightxauthserver=yes keyingtries=0 pfs=yes auto=add auth=esp esp=3DES-SHA1 # protocol used for authentication in sonicwall ike=3DES-SHA1 authby=secret aggrmode=yesNow you can start the services
# service ipsec start or # ipsec setup --start ipsec_setup: Starting Openswan IPsec U2.6.32/K2.6.18-238.9.1.el5xen... ipsec_setup: /usr/libexec/ipsec/addconn Non-fips mode set in /proc/sys/crypto/fips_enabled
openswan configuration in RedHat5
Follow the below links for more tutorials
Why is Linux more secure than windows and any other OS
What is the difference between "su" and "su -" in Linux?
What is swappiness and how do we change its value?
How to log iptables messages in different log file
What are the s and k scripts in the etc rcx.d directories
How to check all the currently running services in Linux
How to auto start service after reboot in Linux
What is virtual memory, paging and swap space?
How to create password less ssh connection for multiple non-root users
How to create user without useradd command in Linux
How to unlink/delete a symbolic in Linux