Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Listing active connections and IPs on server #5

Closed
shankscoder opened this issue Jun 9, 2017 · 7 comments
Closed

Listing active connections and IPs on server #5

shankscoder opened this issue Jun 9, 2017 · 7 comments

Comments

@shankscoder
Copy link

Hi,
Is there a way to get a list of active connections and the local IPs they're connected as?

We're trying to create a private network to monitor some devices, and being able to list the active devices and their IPS would be super helpful for our admins. Is this possible?

@shankscoder
Copy link
Author

Ahh, sorry I found the answer partially.

docker exec -it ipsec-vpn-server ipsec whack --trafficstatus shows live connections, but doesn't show the local lease IP. However according to the Changelog for libreswan, from V3.18 this should be available.

Maybe upgrading Swan ver to V3.20 might solve this. Will check and inform.

@shankscoder
Copy link
Author

So, the build breaks when changing the SWAN_VER variable in the Dockerfile to 3.19 or 3.20 despite these being valid versions.

For some reason, IPSEC doesn't turn on for these builds, and Pluto doesn't run.

I'm a bit stumped as to why this is.

Are you doing anything different in the build to get the container image built and running?

@hwdsl2
Copy link
Contributor

hwdsl2 commented Jun 12, 2017

@shankscoder Try the original project at https://github.com/hwdsl2/docker-ipsec-vpn-server, which this project is based on, and see if it works for your use case.

The reason is that Libreswan 3.19 and newer require some configuration changes. See: [1] [2].

[1] https://github.com/hwdsl2/setup-ipsec-vpn/blob/master/extras/vpnupgrade.sh#L76-L93
[2] https://github.com/hwdsl2/setup-ipsec-vpn/blob/master/extras/vpnupgrade.sh#L161-L168

@shankscoder
Copy link
Author

@hwdsl2 thanks for this. Will try it out.

@jgimenez
Copy link
Member

Just updated to libreswan 3.21 in here 54fe9b3

Thanks @hwdsl2 for your contribution!

@pavelsr
Copy link

pavelsr commented Dec 15, 2017

Does anyone know is it possible to show list of all connected users ? Ability to identify client will be extremelly useful feature.

For now I saw only possibilities

to see total amount of connected clients:
docker exec -it ipsec-vpn-server netstat -i | grep "ppp" | wc -l

and ip addresses of all connected clients:
docker exec -it ipsec-vpn-server ipsec whack --trafficstatus

But I haven't found the way how to list of connected users. Is it possible ?

@pavelsr
Copy link

pavelsr commented Dec 15, 2017

Created a separate issue #6 for it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants