Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opportunistic Encryption program and various related tests added #263

Closed
wants to merge 39 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
dfb81c0
certoe server restart and crash test cases added
Rishabh04-02 Jul 21, 2019
a6b90ed
modifications in test cases
Rishabh04-02 Jul 21, 2019
7a04b4a
test cases reference updated
Rishabh04-02 Jul 26, 2019
66d2a07
Merge branch 'master' of https://github.com/libreswan/libreswan
Rishabh04-02 Jul 26, 2019
18593a9
testing: the working of two clients behind NAT, with one not using IPsec
Rishabh04-02 Jul 31, 2019
0cfb727
Merge branch 'master' of https://github.com/libreswan/libreswan
Rishabh04-02 Jul 31, 2019
59bd3d1
ping 20% packet loss issue fixed in test cases
Rishabh04-02 Aug 1, 2019
5d96ed2
Merge branch 'master' of https://github.com/libreswan/libreswan
Rishabh04-02 Aug 1, 2019
46c1442
oe configuration files updated
Rishabh04-02 Aug 1, 2019
e5a9424
Merge branch 'master' of https://github.com/libreswan/libreswan
Rishabh04-02 Aug 3, 2019
6360ca2
Merge branch 'master' of https://github.com/libreswan/libreswan
Rishabh04-02 Aug 7, 2019
c0008e5
new test added: testing for client crash
Rishabh04-02 Aug 7, 2019
58338e0
testing: client restarts cleanly test case added
Rishabh04-02 Aug 7, 2019
efb9c46
Merge branch 'master' of https://github.com/libreswan/libreswan
Rishabh04-02 Aug 7, 2019
da09ca3
testing: issues fixed
Rishabh04-02 Aug 7, 2019
f0f38c1
Merge branch 'master' of https://github.com/libreswan/libreswan
Rishabh04-02 Aug 7, 2019
f0c5640
Support for OE added
Rishabh04-02 Aug 7, 2019
ecda5e5
corrections
Rishabh04-02 Aug 9, 2019
ec243d7
Merge branch 'master' of github.com:Rishabh04-02/libreswan
Rishabh04-02 Aug 9, 2019
60cf751
TWO TUNNELS UP added
Rishabh04-02 Aug 9, 2019
7f81d48
Merge branch 'master' of github.com:Rishabh04-02/libreswan
Rishabh04-02 Aug 9, 2019
65da407
modifications
Rishabh04-02 Aug 9, 2019
5abd016
Merge branch 'master' of github.com:Rishabh04-02/libreswan
Rishabh04-02 Aug 9, 2019
f21b455
certificate auto update implemented
Rishabh04-02 Aug 11, 2019
8680af5
manual certificate renewal route added
Rishabh04-02 Aug 13, 2019
34ee644
added IPs to private-or-clear
Rishabh04-02 Aug 15, 2019
46d01f4
server config updated
Rishabh04-02 Aug 15, 2019
b38e6c1
Various fixes
Rishabh04-02 Aug 15, 2019
bb48546
man ipsec fixed
Rishabh04-02 Aug 15, 2019
ad24178
man ipsec fixed
Rishabh04-02 Aug 15, 2019
ddb81a6
updations
Rishabh04-02 Aug 15, 2019
e999084
man page corrections
Rishabh04-02 Aug 15, 2019
d5f9967
man page corrections
Rishabh04-02 Aug 15, 2019
978cb8e
man page corrections
Rishabh04-02 Aug 15, 2019
22ffc55
man page corrections
Rishabh04-02 Aug 15, 2019
482df8c
letsencrypt dir added
Rishabh04-02 Aug 15, 2019
8970f91
manvolume updated
Rishabh04-02 Aug 15, 2019
7910620
tags closing issue
Rishabh04-02 Aug 15, 2019
ea56dcd
tags closing issue
Rishabh04-02 Aug 15, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 0 additions & 3 deletions docs/examples/oe-letsencrypt-client.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@

# See https://libreswan.org/wiki/HOWTO:_Opportunistic_IPsec_using_LetsEncrypt
#
conn private-or-clear
rightid=%fromcert
rightrsasigkey=%cert
Expand Down
11 changes: 6 additions & 5 deletions docs/examples/oe-letsencrypt-server.conf
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@

conn clear-or-private
leftid=%fromcert
leftrsasigkey=%cert
# nickname of your letsencrypt certificate imported to NSS
leftcert=letsencrypt.libreswan.org
# name of your generated letsencrypt certificate e.g. letsencrypt.libreswan.org
leftcert=YourServerDNSName
leftauth=rsasig
left=%defaultroute
leftaddresspool=100.64.0.1-100.64.255.254
leftmodecfgclient=yes
#leftmodecfgclient=yes
#
rightid=%null
rightauth=null
Expand All @@ -19,3 +17,6 @@ conn clear-or-private
ikev2=insist
sendca=issuer
auto=add
#
rightaddresspool=100.64.0.1-100.64.255.254
rightmodecfgclient=yes
1 change: 1 addition & 0 deletions programs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ SUBDIRS+=readwriteconf
SUBDIRS+=_import_crl
SUBDIRS+=algparse
SUBDIRS+=cavp
SUBDIRS+=letsencrypt

ifeq ($(USE_PORTEXCLUDES),true)
SUBDIRS+=portexcludes
Expand Down
6 changes: 4 additions & 2 deletions programs/configs/private-or-clear.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,7 @@
# prefer encrypt all incoming smtp traffic
# 0.0.0.0/0 tcp 25 0
#
# Ideally, enable this for every host on the internet
# 0.0.0.0/0
# The libreswan letsenccrypt test server - this can be left enabled at all times
193.110.157.131/32
# Attempt OE IPsec using letsencrypt for the entire Internet - Comment out to disable
0.0.0.0/0
4 changes: 4 additions & 0 deletions programs/ipsec/ipsec.in
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,10 @@ while [ ${#} -gt 0 ]; do
setupoption="--stop"
shift
;;
letsencrypt)
shift
exec "${IPSEC_EXECDIR}/letsencrypt" "${@}"
;;
restart|--restart)
cmd="setup"
setupoption="--restart"
Expand Down
22 changes: 22 additions & 0 deletions programs/letsencrypt/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Makefile for miscellaneous programs
# Copyright (C) 2002-2006 Michael Richardson <mcr@xelerance.com>
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version. See <https://www.gnu.org/licenses/gpl2.txt>.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.

PROGRAM=letsencrypt

ifdef top_srcdir
include $(top_srcdir)/mk/program.mk
else
include ../../mk/program.mk
endif

programs: ${PROGRAM}
92 changes: 92 additions & 0 deletions programs/letsencrypt/letsencrypt.8.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<!-- lifted from troff+man by doclifter -->
<refentry>
<refentryinfo>
<author><firstname>Rishabh</firstname><surname></surname><authorblurb><para></para> </authorblurb></author>
</refentryinfo>
<refmeta>
<refentrytitle>IPSEC_LETSENCRYPT</refentrytitle>
<manvolnum>8</manvolnum>
<refmiscinfo class='date'>3 August 2019</refmiscinfo>
<refmiscinfo class="source">libreswan</refmiscinfo>
<refmiscinfo class="manual">Executable programs</refmiscinfo>
</refmeta>
<refnamediv id='name'>
<refname>ipsec letsencrypt</refname>
<refpurpose>invoke Opportunistic Encryption utilities</refpurpose>
</refnamediv>
<!-- body begins here -->
<refsynopsisdiv id='synopsis'>
<cmdsynopsis>
<command>ipsec</command>
<arg choice='plain'><replaceable>letsencrypt</replaceable></arg>
<arg choice='opt'>--client </arg>
<arg choice='opt'>--server </arg>
<arg choice='opt'>--test </arg>
<arg choice='opt'>--disable </arg>
<arg choice='opt'>--help </arg>
<sbr/>
<arg choice='opt'><arg choice='plain'>--generate-certificate </arg><arg choice='plain'><replaceable>hostname</replaceable></arg></arg>
<arg choice='opt'><arg choice='plain'>--renew </arg><arg choice='plain'><replaceable>hostname</replaceable></arg></arg>
<sbr/>
</cmdsynopsis>
</refsynopsisdiv>

<refsect1 id='examples'><title>EXAMPLES</title>
<cmdsynopsis>
<command>ipsec</command>
<arg choice='plain'><replaceable>letsencrypt</replaceable></arg>
<arg choice='plain'>{ --client | --server | --test | --disable | -- help }</arg>
</cmdsynopsis>
<cmdsynopsis>
<command>ipsec</command>
<arg choice='plain'><replaceable>letsencrypt</replaceable></arg>
<arg choice='plain'>{ --generate-certificate | --renew }</arg>
<arg choice='plain'><replaceable>hostname</replaceable></arg>
</cmdsynopsis>
</refsect1>
<refsect1 id='description'><title>DESCRIPTION</title>
<para><emphasis remap='I'>Letsencrypt</emphasis>
The command creates a secure Opportunistic Connection between the hosts commonly referred to as client and server.
The client connects to the server and remains anonymous, whereas the server is authenticated before connecting to it.
The server is not anonymous. The server uses Let's Encrypt certificates for authentication and encryption purposes.</para>

<para>The
<option>--client</option>
operation is used for initial client setup.</para>

<para>The
<option>--server</option>
operation is used for initial server setup.</para>

<para>The
<option>--test</option>
operation is used for testing the configuration/connection.</para>

<para>The
<option>--generate-certificate hostname</option>
operation is used for generating the certificate for the hostname.</para>

<para>The
<option>--renew hostname</option>
operation is used for updating the generated certificate, it keeps the private key same.</para>

<para>The
<option>--disable</option>
operation is used for disabling IPsec service.</para>

<para>The
<option>--help</option>
operation is used for displaying all the available options.</para>
</refsect1>
<refsect1 id='see_also'><title>SEE ALSO</title>
<para>
<citerefentry><refentrytitle>ipsec.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
</para>
</refsect1>
<refsect1 id='history'><title>HISTORY</title>
<para>Original Program written by &lt;<ulink url='https://github.com/Rishabh04-02/'>Rishabh</ulink>&gt; .</para>
</refsect1>
</refentry>