LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 09-02-2019, 09:09 PM   #1
msquires1972
LQ Newbie
 
Registered: Sep 2019
Posts: 2

Rep: Reputation: Disabled
How do I configure StrongSwan (ipsec) to access VLAN subnets?


I am setting up a Site to site StrongSwan VPN on Debian 9 and Debian 10 OS.

For testing I added an IP address to the LO interface, I also added VLAN interfaces to the LO interface [lo.2. lo.3 and lo.4].



Name ---- IPv4 address ---- Netmask
lo ---- 192.168.166.1 ---- 255.255.255.252
lo.2 ---- 192.168.1.1 ---- 255.255.255.252
lo.3 ---- 192.192.2.2 ---- 255.255.255.252
lo.4 ---- 192.111.4.5 ---- 255.255.255.252

===============================================

The ipsec configuration file: SITE=A

# ipsec.conf - strongSwan IPsec configuration file
# basic configuration

config setup
charoudebug="all"
strictcrlpolicy=no
uniqueids = yes

# connection to 10.0.0.4
conn 10.0.0.6-to-VPN
authby=secret
left=%defaultroute
leftid=10.0.0.6
leftsubnet=10.1.1.0/27
right=10.0.0.4
rightsubnet=192.168.166.0/30 192.168.1.0/30 192.192.2.0/30 192.111.4.5
ike=aes256-sha2_256-modp1024!
esp=aes256-sha2_256!
keyingtries=0
ikelifetime=24h
lifetime=8h
dpddelay=30
dpdtimeout=120
dpdaction=restart
auto=start

include /var/lib/strongswan/ipsec.conf.inc

=====================================================

The ipsec configuration file: SITE=B


# ipsec.conf - strongSwan IPsec configuration file
# basic configuration

config setup
charondebug="all"
uniqueids=yes
strictcrlpolicy=no

# Connection to 10.0.0.6
conn VPN-to-10.0.0.6
authby=secret
left=%defaultroute
leftid=10.0.0.4
leftsubnet=192.168.166.0/30 192.168.1.0/30 192.192.2.0/30 192.111.4.5
right=10.0.0.6
rightsubnet=10.1.1.0/27
ike=aes256-sha2_256-modp1024!
esp=aes256-sha2_256!
keyingtries=0
ikelifetime=24h
lifetime=8h
dpddelay=30
dpdtimeout=120
dpdaction=restart
auto=start

include /var/lib/strongswan/ipsec.conf.inc

====================================================

Based on instructions I found, I tired these on both LeftSubnet and RightSubnet for SITE A & B:

leftsubnet=192.168.166.0/30 192.168.1.0/30 192.192.2.0/30 192.111.4.5

leftsubnets=192.168.166.0/30 192.168.1.0/30 192.192.2.0/30 192.111.4.5

leftsubnet={192.168.166.0/30,192.168.1.0/30,192.192.2.0/30,192.111.4.5}

leftsubnets={192.168.166.0/30,192.168.1.0/30,192.192.2.0/30,192.111.4.5}

====================================================

Is what I am trying to achieve even possible, or should I use another option?
 
Old 09-10-2019, 02:33 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
You need setup virtual tunnel interface to make it work.
 
Old 09-18-2019, 09:02 AM   #3
msquires1972
LQ Newbie
 
Registered: Sep 2019
Posts: 2

Original Poster
Rep: Reputation: Disabled
I was able to resolve the issue.
Thank you for the assist.
 
  


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
[SOLVED] Strongswan IKEv2 - clients can access everything BUT strongswan machine itself - "truncated-udp length 0" psycroptic Linux - Networking 3 05-27-2017 03:41 AM
Strongswan-to-Strongswan IPsec VPN - slow with pure ESP, fast w/UDP encapsulation? psycroptic Linux - Networking 0 11-20-2014 07:44 AM
Strongswan IPSec problems speakerbox Linux - Networking 2 05-05-2012 02:10 AM
Strongswan - IPsec tunnel - can we have one way tunnel vishalwithme Linux - Networking 4 04-05-2012 12:07 AM
strongswan ipsec culin Linux - Networking 4 08-16-2011 11:31 PM

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

All times are GMT -5. The time now is 05:54 AM.

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