OpenVswitch & Ipsec - openstack

How can I check if our OVS setup can handle ipsec feature , is there any ovs command to check that ?
from docker hub i did pull for image openvswitch/ovs , and I want to know if it support ipsec config.

Related

Trying to setup 2 IPsec tunnels, can't get clients to talk with each other

This is my setup:
I (192.168.178.55) am trying to reach a computer from another company (10.6.35.16). The other computer is in a local network with his IPsec client (left site). I am connected via a IPsec Tunnel with my Firewall/router pfsense (right site).
As you can see, the IPSec tunnels are established, but I still cant reach the other computer.
The firewall is open for all IPsec traffic.
2 things i am woundering about:
Shouldn't my client (native Win10 VPN client) have an standard gateway ( see IP-config bottom right)?
Phase 2 of the connection between my client and pfsense is disconnected, is that correct?
Is there anything else I need to configure to let those 2 computers talk?

Verifying that a communication is happening over IPSec?

Is there a way one could test whether the communication between two hosts is happening over the IPSec protocol?
I have two different hosts running the OpenSource Peer2PeerVPN solution. And I have one host listening for messages via the net-cat tool.
nc -v -l -p 9999
And the other host connected to this via the VPN tunnel
nc -v 192.168.188.2 9999
I want to verify or check whether the communication is actually happening over the IPSec protocol. Also, I would like to see the values of the IPSec Protocol's Authentication and Encapsulation Headers.
I tried tcpdump but I'm guessing it only provides a capture on the layer above the Network level - Transport.
EDIT:
Based on a comment below I downloaded a sample pcap file to view how headers look in a IPSec communication. I see that these traces have ESP headers of the IPSec protocol.
However, when I try the same with the VPN Tool I'm using I don't see any packets with ESP header on the tcpdump. I was listening on the VPN interface (peervpn0) that the tool creates.
To check if this was a problem with the tool, I connected to a remote server to which I usually connect using VPN and sent some data via netcat to my machine from inside the remote-machine (I ssh'ed in). I listened for all packets on the VPN interface created by the Cisco VPN Tool (utun0) with filter esp
tcpdump -vvv -i utun0 esp
Still, I did not see any traces.
What am I missing here?
Should I listen on the default interface (my wifi interface) via which the VPN tunnel is created to see the ESP Headers?
Or have understood something wrong here?
Thank You
Shabir
With some further reading I was able to find out that PeerVPN does not communicate over IPSec but using encryption and sends the data as UDP payload over the underlying interface.
I also saw that many of the VPN tools indeed do this and does encrypt the tunnel interface packets and forwards them over UDP in the underlying interface. Besides some VPN solutions have a separate option to enable IPSec protocol specifically.
Thank You.

Docker on CentOS with bridge to LAN network

I have a server VLAN of 10.101.10.0/24 and my Docker host is 10.101.10.31. How do I configure a bridge network on my Docker host (VM) so that all the containers can connect directly to my LAN network without having to redirect ports around on the default 172.17.0.0/16? I tried searching but all the howtos I've found so far have resulted in losing SSH session which I had to go into the VM from a console to revert the steps I did.
There's multiple ways this can be done. The two I've had most success with are routing a subnet to a docker bridge and using a custom bridge on the host LAN.
Docker Bridge, Routed Network
This has the benefit of only needing native docker tools to configure docker. It has the down side of needing to add a route to your network, which is outside of dockers remit and usually manual (or relies on the "networking team").
Enable IP forwarding
/etc/sysctl.conf: net.ipv4.ip_forward = 1
sysctl -p /etc/sysctl.conf
Create a docker bridge with new subnet on your VM network, say 10.101.11.0/24
docker network create routed0 --subnet 10.101.11.0/24
Tell the rest of the network that 10.101.11.0/24 should be routed via 10.101.10.X where X is IP of your docker host. This is the external router/gateway/"network guy" config. On a linux gateway you could add a route with:
ip route add 10.101.11.0/24 via 10.101.10.31
Create containers on the bridge with 10.101.11.0/24 addresses.
docker run --net routed0 busybox ping 10.101.10.31
docker run --net routed0 busybox ping 8.8.8.8
Then your done. Containers have routable IP addresses.
If you're ok with the network side, or run something like RIP/OSPF on the network or Calico that takes care of routing then this is the cleanest solution.
Custom Bridge, Existing Network (and interface)
This has the benefit of not requiring any external network setup. The downside is the setup on the docker host is more complex. The main interface requires this bridge at boot time so it's not a native docker network setup. Pipework or manual container setup is required.
Using a VM can make this a little more complicated as you are running extra interfaces with extra MAC addresses over the main VM's interface which will need additional "Promiscuous" config first to allow this to work.
The permanent network config for bridged interfaces varies by distro. The following commands outline how to set the interface up and will disappear after reboot. You are going to need console access or a seperate route into your VM as you are changing the main network interface config.
Create a bridge on the host.
ip link add name shared0 type bridge
ip link set shared0 up
In /etc/sysconfig/network-scripts/ifcfg-br0
DEVICE=shared0
TYPE=Bridge
BOOTPROTO=static
DNS1=8.8.8.8
GATEWAY=10.101.10.1
IPADDR=10.101.10.31
NETMASK=255.255.255.0
ONBOOT=yes
Attach the primary interface to the bridge, usually eth0
ip link set eth0 up
ip link set eth0 master shared0
In /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
TYPE=Ethernet
IPV6INIT=no
USERCTL=no
BRIDGE=shared0
Reconfigure your bridge to have eth0's ip config.
ip addr add dev shared0 10.101.10.31/24
ip route add default via 10.101.10.1
Attach containers to bridge with 10.101.10.0/24 addresses.
CONTAINERID=$(docker run -d --net=none busybox sleep 600)
pipework shared1 $CONTAINERID 10.101.10.43/24#10.101.10.Y
Or use a DHCP client inside the container
pipework shared1 $CONTAINERID dhclient
Docker macvlan network
Docker has since added a network driver called macvlan that can make a container appear to be directly connected to the physical network the host is on. The container is attached to a parent interface on the host.
docker network create -d macvlan \
--subnet=10.101.10.0/24 \
--gateway=10.101.10.1 \
-o parent=eth0 pub_net
This will suffer from the same VM/softswitch problems where the network and interface will need be promiscuous with regard mac addresses.

Why use (open)VPN with (free)radius and not directly with (open)ldap

For a school project I need to setup a SSO solution.
This includes a vpn service, a postgresql DB and LDAP.
For the VPN solution I need to use OpenVPN but why would I use
Radius (as the documentation/assignment states) when OpenVPN has
a perfectly capable (for as far as I can see) implementation for
OpenLDAP.
So why would I set it up that OpenVPN uses freeRADIUS to ask OpenLDAP
for authentication/authorization?
The network setup:
Router (eth0 = outside, eth1 = DMZ, eth2 = proxy, tun0 = openvpn = own subnet)
DMZ (webserver for everything coming from the outside, NGINX and wildlfy)
Proxy (NGINX, bit redundent i know, eth0 = router, eth1 = internal servers)
DB server (eth0 = proxy, runs postgresql)
auth server (eth0 = proxy, runs OpenLDAP)
snmp server (eth0 = proxy, openNMS, just an added bonus not of interest to the assignment really)
Thank you in advance!
I'm not a Open VPN expert, but if you want only to check the users credentials and groups privileges you can bypass RADIUS (but I found it and advanced step not only for the auth, also for future use like wifi 802.1X access etc...)

How to connect X-Lite softphone from host to guest vm with asterisk?

I am desperate. I've install asterisk on vm 1 (centos) and opensips on vm2(centos), and everything works well so far. Now I need to connect softphone from host to vm1 (to make a call (I'm traying to set up auto-dial out system))) and don't know how to. I use host-only networking between vm's
vm1 - 192.168.56.3
vm2 - 192.168.56.4
host - I've set up rule in firewall, to make traffic enabled between vm's and host, but can't ping from guest to host/ host to guest.
Simplest way - use bridged network to your router.
But host-only also work ok(at least in vmware and virtualbox), check your firewall rules

Resources