LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-14-2017, 02:38 PM   #1
pklinux
LQ Newbie
 
Registered: Feb 2017
Posts: 1

Rep: Reputation: Disabled
Have trouble setting up an ip route


Hi,
I am trying to setup an ipsec vpn tunnel using Openswan on CentOS. But I cannot get it up. Here is my ipsec.conf file :
config setup
plutodebug=all
plutostderrlog=/var/log/pluto.log
protostack=netkey
nat_traversal=yes
virtual_private=%v4:10.0.0.0/8,%v4:192.168.0.0/16,%v4:172.16.0.0/12
## disable opportunistic encryption in Red Hat ##
oe=off


conn A-B
authby=secret
auto=start
ike=aes256-sha1;modp1024
keyexchange=ike
phase2alg=aes256-sha1;modp1024
ikelifetime=24h
keylife=1h
#compress=no
pfs=yes
type=tunnel
aggrmode=yes
left=%defaultroute
leftsubnet=<my-private-subnet>
leftnexthop=%defaultroute
right=<public-ip-of-remote-gateway>
rightsubnet=<remote-subnet>

Is it anything in this config which needs to be different? Or do I need to modify my iptables? My iptables have rules for accepting connections on udp-500, tcp-4500 and udp-4500.
Also when I run the command "ip route", I dont see a route between the remote server and my gateway.
Thank You.

Last edited by pklinux; 02-14-2017 at 02:40 PM.
 
Old 02-15-2017, 03:32 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
You need use interface mode, adding following line in config setup section.
interfaces="ipsec0=eth1 ipsec1=ppp0" or interfaces=%defaultroute
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble with network (ping, route, gateway) jdmmis Linux - Networking 8 06-23-2015 10:09 AM
trouble adding static route to fedora 11 JSLayton Fedora 13 11-02-2011 11:25 PM
Having trouble with default route/gateway x2r3x Linux - Networking 4 07-28-2011 05:32 PM
trouble with route, vbox qrange Linux - Networking 1 01-19-2011 11:46 AM
Setting RH9 box up to route lathspel Linux - Networking 4 09-29-2003 01:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration