Giter Club home page Giter Club logo

ctunnel's People

Contributors

alienrobotarmy avatar emgomez-bancolombia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ctunnel's Issues

Build with openssl 1.1

With the new version you cannot build becouse are not allowed to see inside internals structures in openssl >= 1.1.0, you can see: openssl/openssl#962

On crypto.c in function *openssl_crypto_init

#if OPENSSL_VERSION_NUMBER < 0x10100000L
    crypto_ctx *ctx = calloc(1, sizeof (crypto_ctx));
#else
    crypto_ctx *ctx = EVP_CIPHER_CTX_new();
#endif

Or with a patch diff

diff --git a/src/crypto.c b/src/crypto.c
index 951787a..1e2a20c 100644
--- a/src/crypto.c
+++ b/src/crypto.c
@@ -16,25 +16,26 @@
 #include <errno.h>
 #include <openssl/opensslv.h>
 
+
 #include "ctunnel.h"
 
 #ifdef HAVE_OPENSSL
 
-
-crypto_ctx *openssl_crypto_init(struct options opt, int dir)
-{
-    //HMAC_CTX *hm_ctx= HMAC_CTX_new();
-    //crypto_ctx *ctx = calloc(1, sizeof(crypto_ctx));
-    crypto_ctx *ctx =  EVP_CIPHER_CTX_new();
+crypto_ctx *openssl_crypto_init(struct options opt, int dir) {
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+    crypto_ctx *ctx = calloc(1, sizeof (crypto_ctx));
+#else
+    crypto_ctx *ctx = EVP_CIPHER_CTX_new();
+#endif
 
     if (opt.proxy == 0) {
 
-    /* STREAM CIPHERS ONLY */
-    EVP_CIPHER_CTX_init(ctx);
-    EVP_CipherInit_ex(ctx, opt.key.cipher, NULL,
-                       opt.key.key, opt.key.iv, dir);
-    /* Encrypt final for UDP? */
-    EVP_CIPHER_CTX_set_padding(ctx, 1);
+        /* STREAM CIPHERS ONLY */
+        EVP_CIPHER_CTX_init(ctx);
+        EVP_CipherInit_ex(ctx, opt.key.cipher, NULL,
+                opt.key.key, opt.key.iv, dir);
+        /* Encrypt final for UDP? */
+        EVP_CIPHER_CTX_set_padding(ctx, 1);
     }
 
     return ctx;
@@ -52,7 +53,11 @@ void openssl_crypto_reset(crypto_ctx *ctx, struct options opt, int dir)
 void openssl_crypto_deinit(crypto_ctx *ctx)
 {
     EVP_CIPHER_CTX_cleanup(ctx);
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+    free(ctx);
+#else
     EVP_CIPHER_CTX_free(ctx);
+#endif
 }
 struct Packet openssl_do_encrypt(crypto_ctx *ctx, unsigned char *intext,
                                 int size)
@@ -140,4 +145,4 @@ struct Packet gcrypt_do_decrypt(crypto_ctx ctx, unsigned char *intext,
 
     return crypto;
 }
-#endif
+#endif 
\ No newline at end of file


How do i compile this thing?

Hey, what is Linux and this MAKE stuff?

Why can't i just run setup.exe and make it work?

Does this ctunnel actually do anything for Windows?

:)

ctunnel "client" option core dumped

example1:
./ctunnel -V -c -n -C rc4
ctunnel 0.7 Copyright (C) 2008-2014 Jess Mahan
Enter Key [16 Characters]: 1234567891234567
Enter IV [16 Characters]: 1234567891234567
[ctunnel] ctunnel 0.7 starting
[ctunnel] TCP [OpenSSL] VPN using rc4
Segmentation fault

example2:
./ctunnel -V -f 127.0.0.1:8889 -c -t 2 -n -C plain
ctunnel 0.7 Copyright (C) 2008-2014 Jess Mahan
[ctunnel] ctunnel 0.7 starting
Segmentation fault (core dumped)

example3:
./ctunnel -V -l 127.0.0.1:8889 -c -t 2 -n -C rc4
ctunnel 0.7 Copyright (C) 2008-2014 Jess Mahan
[ctunnel] ctunnel 0.7 starting
[ctunnel] TCP [OpenSSL] VPN using rc4
Segmentation fault (core dumped)

coredump.tar.gz

  1. the version info is not updated ,still 0.7
  2. client option always crash with " -C plain" option

./ctunnel -V -f 127.0.0.1:8889 -c -t 2 -n -C plain bad
./ctunnel -V -f 127.0.0.1:8889 -c -t 2 -n -C cr4 good

  1. sometimes client is not conected with server , crashed (not sure)

  2. -c option with -l (not -f) crashed

how to make ctunnel with no cryptographic / encrypting

"ctuunel also is a plain tunnel" But I dont find the option to disable the cryptographic.

I want to use the ctuunel VPN fuction to forward my encryption content and dont want it to be encrypted twice.

Do you have any idea ? Thanks.

Ctunnel help

Hello sir
I'm trying to use ctunnel but its not working for me can you kindly help me

Server
ctunnel -H 127.0.0.1 -s -l 2222 -f 2221 -C aes-256-cfb
ctunnel 0.7 Copyright (C) 2008-2014 Jess Mahan
Must specify hostname:port

ctunnel -l localhost:22:aes-128-cfb -f 10.0.0.1:22:rc4 -s
ctunnel 0.7 Copyright (C) 2008-2014 Jess Mahan
Enter Key [16 Characters]:

cannot run it.Please help

IPv6 compatible?

Is ctunnel compatible with IPv6?
Trying to proxy with ctunnel to an IPv6 host, but ctunnel is not binding to IPv6, instead it is listening on 255.255.255.255.
What is the syntax to use IPv6?
[IPv6-ip]:port

Multiple clients with one server - VPN mode

Hi
I was trying to use VPN mode in the manner of multiple clients connect to one server. They all get connected. I can ping the server from all the clients but the server cannot ping all clients. In detail, the server can only ping one server a time and that server is dynamically changed. For example, for a few seconds, client A is accessible from server, after that it changes to Client B and etc ..
What is the problem? How it can be fixed?
Thanks

Failed to build

/usr/bin/ld: log.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:214: multiple definition of threads'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:214: first defined here /usr/bin/ld: log.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:207: multiple definition of mutex'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:207: first defined here
/usr/bin/ld: net.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:233: multiple definition of do_encrypt'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:233: first defined here /usr/bin/ld: net.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:234: multiple definition of do_decrypt'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:234: first defined here
/usr/bin/ld: net.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:235: multiple definition of crypto_init'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:235: first defined here /usr/bin/ld: net.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:236: multiple definition of crypto_deinit'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:236: first defined here
/usr/bin/ld: net.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:237: multiple definition of crypto_reset'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:237: first defined here /usr/bin/ld: net.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:230: multiple definition of clients'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:230: first defined here
/usr/bin/ld: net.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:229: multiple definition of hosts'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:229: first defined here /usr/bin/ld: net.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:214: multiple definition of threads'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:214: first defined here
/usr/bin/ld: net.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:207: multiple definition of mutex'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:207: first defined here /usr/bin/ld: opt.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:237: multiple definition of crypto_reset'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:237: first defined here
/usr/bin/ld: opt.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:236: multiple definition of crypto_deinit'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:236: first defined here /usr/bin/ld: opt.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:235: multiple definition of crypto_init'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:235: first defined here
/usr/bin/ld: opt.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:234: multiple definition of do_decrypt'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:234: first defined here /usr/bin/ld: opt.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:233: multiple definition of do_encrypt'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:233: first defined here
/usr/bin/ld: opt.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:230: multiple definition of clients'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:230: first defined here /usr/bin/ld: opt.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:229: multiple definition of hosts'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:229: first defined here
/usr/bin/ld: opt.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:214: multiple definition of threads'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:214: first defined here /usr/bin/ld: opt.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:207: multiple definition of mutex'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:207: first defined here
/usr/bin/ld: stats.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:237: multiple definition of crypto_reset'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:237: first defined here /usr/bin/ld: stats.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:236: multiple definition of crypto_deinit'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:236: first defined here
/usr/bin/ld: stats.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:235: multiple definition of crypto_init'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:235: first defined here /usr/bin/ld: stats.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:234: multiple definition of do_decrypt'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:234: first defined here
/usr/bin/ld: stats.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:233: multiple definition of do_encrypt'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:233: first defined here /usr/bin/ld: stats.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:230: multiple definition of clients'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:230: first defined here
/usr/bin/ld: stats.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:229: multiple definition of hosts'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:229: first defined here /usr/bin/ld: stats.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:214: multiple definition of threads'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:214: first defined here
/usr/bin/ld: stats.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:207: multiple definition of mutex'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:207: first defined here /usr/bin/ld: tun.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:229: multiple definition of hosts'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:229: first defined here
/usr/bin/ld: tun.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:237: multiple definition of crypto_reset'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:237: first defined here /usr/bin/ld: tun.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:236: multiple definition of crypto_deinit'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:236: first defined here
/usr/bin/ld: tun.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:235: multiple definition of crypto_init'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:235: first defined here /usr/bin/ld: tun.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:234: multiple definition of do_decrypt'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:234: first defined here
/usr/bin/ld: tun.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:233: multiple definition of do_encrypt'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:233: first defined here /usr/bin/ld: tun.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:230: multiple definition of clients'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:230: first defined here
/usr/bin/ld: tun.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:214: multiple definition of threads'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:214: first defined here /usr/bin/ld: tun.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:207: multiple definition of mutex'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:207: first defined here
/usr/bin/ld: tunnel_loop.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:214: multiple definition of threads'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:214: first defined here /usr/bin/ld: tunnel_loop.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:207: multiple definition of mutex'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:207: first defined here
/usr/bin/ld: tunnel_loop.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:237: multiple definition of crypto_reset'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:237: first defined here /usr/bin/ld: tunnel_loop.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:236: multiple definition of crypto_deinit'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:236: first defined here
/usr/bin/ld: tunnel_loop.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:235: multiple definition of crypto_init'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:235: first defined here /usr/bin/ld: tunnel_loop.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:234: multiple definition of do_decrypt'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:234: first defined here
/usr/bin/ld: tunnel_loop.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:233: multiple definition of do_encrypt'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:233: first defined here /usr/bin/ld: tunnel_loop.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:230: multiple definition of clients'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:230: first defined here
/usr/bin/ld: tunnel_loop.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:229: multiple definition of hosts'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:229: first defined here /usr/bin/ld: tunnel_thread.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:233: multiple definition of do_encrypt'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:233: first defined here
/usr/bin/ld: tunnel_thread.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:234: multiple definition of do_decrypt'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:234: first defined here /usr/bin/ld: tunnel_thread.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:235: multiple definition of crypto_init'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:235: first defined here
/usr/bin/ld: tunnel_thread.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:236: multiple definition of crypto_deinit'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:236: first defined here /usr/bin/ld: tunnel_thread.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:207: multiple definition of mutex'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:207: first defined here
/usr/bin/ld: tunnel_thread.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:214: multiple definition of threads'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:214: first defined here /usr/bin/ld: tunnel_thread.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:237: multiple definition of crypto_reset'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:237: first defined here
/usr/bin/ld: tunnel_thread.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:230: multiple definition of clients'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:230: first defined here /usr/bin/ld: tunnel_thread.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:229: multiple definition of hosts'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:229: first defined here
/usr/bin/ld: vpn_handshake.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:235: multiple definition of crypto_init'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:235: first defined here /usr/bin/ld: vpn_handshake.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:236: multiple definition of crypto_deinit'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:236: first defined here
/usr/bin/ld: vpn_handshake.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:234: multiple definition of do_decrypt'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:234: first defined here /usr/bin/ld: vpn_handshake.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:233: multiple definition of do_encrypt'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:233: first defined here
/usr/bin/ld: vpn_handshake.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:229: multiple definition of hosts'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:229: first defined here /usr/bin/ld: vpn_handshake.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:230: multiple definition of clients'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:230: first defined here
/usr/bin/ld: vpn_handshake.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:237: multiple definition of crypto_reset'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:237: first defined here /usr/bin/ld: vpn_handshake.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:214: multiple definition of threads'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:214: first defined here
/usr/bin/ld: vpn_handshake.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:207: multiple definition of mutex'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:207: first defined here /usr/bin/ld: vpn_loop.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:207: multiple definition of mutex'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:207: first defined here
/usr/bin/ld: vpn_loop.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:214: multiple definition of threads'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:214: first defined here /usr/bin/ld: vpn_loop.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:235: multiple definition of crypto_init'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:235: first defined here
/usr/bin/ld: vpn_loop.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:236: multiple definition of crypto_deinit'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:236: first defined here /usr/bin/ld: vpn_loop.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:229: multiple definition of hosts'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:229: first defined here
/usr/bin/ld: vpn_loop.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:230: multiple definition of clients'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:230: first defined here /usr/bin/ld: vpn_loop.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:237: multiple definition of crypto_reset'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:237: first defined here
/usr/bin/ld: vpn_loop.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:234: multiple definition of do_decrypt'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:234: first defined here /usr/bin/ld: vpn_loop.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:233: multiple definition of do_encrypt'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:233: first defined here
/usr/bin/ld: vpn_thread.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:229: multiple definition of hosts'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:229: first defined here /usr/bin/ld: vpn_thread.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:233: multiple definition of do_encrypt'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:233: first defined here
/usr/bin/ld: vpn_thread.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:234: multiple definition of do_decrypt'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:234: first defined here /usr/bin/ld: vpn_thread.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:235: multiple definition of crypto_init'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:235: first defined here
/usr/bin/ld: vpn_thread.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:236: multiple definition of crypto_deinit'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:236: first defined here /usr/bin/ld: vpn_thread.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:237: multiple definition of crypto_reset'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:237: first defined here
/usr/bin/ld: vpn_thread.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:207: multiple definition of mutex'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:207: first defined here /usr/bin/ld: vpn_thread.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:214: multiple definition of threads'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:214: first defined here
/usr/bin/ld: vpn_thread.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:230: multiple definition of `clients'; comp.o:/home/Reel/Downloads/tunnel/ctunnel/src/../include/ctunnel.h:230: first defined here
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:31: ctunnel] Error 1
make[1]: Leaving directory '/home/Reel/Downloads/tunnel/ctunnel/src'
make: *** [Makefile:3: all] Error 2

Feature ctunnel and authentication

Is there an option to use ctunnel not only for encrypting the tunnel, but also to do authentication with the established tunnel?

So is it possible to use a generated pair of keys to encrypt the tunnel and only allow clients to connect which use the matching key from the server. This would be very useful for tunneled applications which do not have an own authentication option.

This would look like this:

Client ------> Server
TUN1 ------> TUN1
Key1 ------> Key1

so only a client which uses the Key1 to establish a connection is allowed to connect to the server.

Latest change for Ubuntu compilation breaks code

Setting arrays like "threads" to static might get the code to compile on Ubuntu but these arrays aren't supposed to be static they should be shared between files eg. "threads" should be shared between tunnel_loop.c and tunnel_thread.c.

I tried to use vpn, still one thing i don't understand

Hello, I have 2 networks I want to connect together:
server A - public ip A, private ip 11.0.0.1, other servers with ips 11.0.0.2, ...
server B - public ip B, private ip 12.0.0.1, other servers with ips 12.0.0.2, ...

I started ctunnel like this:
server A: ctunnel -V -t 8 -i 1.0.0 -n -s -l 0.0.0.0:5001 -C aes-128-cfb -r 11.0.0.0/25
server B: ctunnel -V -t 8 -i 1.0.0 -n -c -f ip_A:5001 -C aes-128-cfb -r 12.0.0.0/25

I can ping 12.0.0.1 from A and 11.0.0.1 from B with no issue, however I can't figure why pinging other servers does not work.
from A: ping 12.0.0.2 returns Destination Host Prohibited
from B: ping 11.0.0.1 returns the same

Do you have any idea ? Is it something related to iptables, where I should do something, but really don't know what :)
I looked at the example, but couldn't understand what it was for.

By the way, great work :)

How to enable compression? (`-z` doesn't seem to work)

I've compiled the latest master branch, and I've tried specifying -z on both ends (client and server), only client, only server, and the connection just seems to reset.

Without -z I can make ctunnel work properly.

failed compiling

make -C src/
make[1]: Entering directory `/root/ctunnel-master/src'

                      ctunnel build using OPENSSL

gcc -g -Wall -Wextra -Wcast-align -Wshadow -Wstrict-prototypes -O2 -DHAVE_OPENSSL -I../include -I./include -DHAVE_TUNTAP -c -o ctunnel.o ctunnel.c
gcc -g -Wall -Wextra -Wcast-align -Wshadow -Wstrict-prototypes -O2 -DHAVE_OPENSSL -I../include -I./include -DHAVE_TUNTAP -c -o net.o net.c
gcc -g -Wall -Wextra -Wcast-align -Wshadow -Wstrict-prototypes -O2 -DHAVE_OPENSSL -I../include -I./include -DHAVE_TUNTAP -o ctunnel cidr.o comp.o crypto.o ctunnel.o exec.o jtok.o keyfile.o log.o net.o opt.o stats.o tun.o tunnel_loop.o tunnel_thread.o vpn_handshake.o vpn_loop.o vpn_thread.o -lz -lpthread -lutil -lc -lcrypto
ctunnel.o: In function main': /root/ctunnel-master/src/ctunnel.c:31: multiple definition of main'
cidr.o:/root/ctunnel-master/src/cidr.c:75: first defined here
net.o: In function in_subnet': /root/ctunnel-master/src/net.c:24: multiple definition of in_subnet'
cidr.o:/root/ctunnel-master/src/cidr.c:24: first defined here
net.o: In function cidr_to_mask': /root/ctunnel-master/src/net.c:40: multiple definition of cidr_to_mask'
cidr.o:/root/ctunnel-master/src/cidr.c:40: first defined here
collect2: ld returned 1 exit status
make[1]: *** [ctunnel] Error 1
make[1]: Leaving directory `/root/ctunnel-master/src'
make: *** [all] Error 2

But seems version 0.7 is fine

feature request

I just want to use a config file to use multi port forward in one process, not launch more..
Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.