LinuxQuestions.org
Visit Jeremy's Blog.
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 08-09-2017, 02:42 PM   #1
mpapet
Member
 
Registered: Nov 2003
Location: Los Angeles
Distribution: debian
Posts: 548

Rep: Reputation: 72
Encrypting One TCP Port and only One TCP Port?


I'm looking for a solution to encrypt or tunnel a single TCP port to a remote host. All other traffic stays off the tunnel.

This doesn't seem like a solution that can be handled by strongswan, but, maybe I haven't found the right how-to.

Are there other alternatives I should consider besides stunnel?
 
Old 08-09-2017, 03:09 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,976

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
I guess I need to know a bit more. When you say tcp port, what do you mean exactly? A network adapter port or do you mean only say tcp:5098?

There are plenty of vpn solutions. Some so secure you can't run it on web. In the past, a vpn was total. There were no ways to let any traffic outside of the vpn. Now you can run a vpn on some traffic usually if you have a means to route it. It isn't considered very secure only because it is not totally isolated from other traffic.

Last edited by jefro; 08-09-2017 at 03:11 PM.
 
Old 08-09-2017, 03:27 PM   #3
mpapet
Member
 
Registered: Nov 2003
Location: Los Angeles
Distribution: debian
Posts: 548

Original Poster
Rep: Reputation: 72
Quote:
Originally Posted by jefro View Post
I guess I need to know a bit more. When you say tcp port, what do you mean exactly? A network adapter port or do you mean only say tcp:5098?
tcp:5098

"Secure" is definitely a fluid word. In this case, I am only trying to encrypt that one port to another host in another location.

Last edited by mpapet; 08-09-2017 at 06:23 PM.
 
Old 08-09-2017, 07:23 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,976

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
I suspect that you could grab that port with some means like iptables. Then you have some choices. Maybe pipe it to a vpn set up on a secondary ip address or might be able to make one nic on vpn and break out of that.

This is the first idea that I had in mind. Plenty of other solutions. https://unix.stackexchange.com/quest...-to-vpn-client

Some firewall/routers may be also able to do this.
 
Old 08-22-2017, 01:29 PM   #5
gradinaruvasile
Member
 
Registered: Apr 2010
Location: Cluj, Romania
Distribution: Debian Testing
Posts: 731

Rep: Reputation: 158Reputation: 158
Openvpn?
 
Old 08-22-2017, 02:20 PM   #6
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
Depending on what exactly you're trying to do, and whether you have ssh access to the destination (or another server sufficiently "close" to the destination), you could use an ssh tunnel or reverse ssh tunnel.
 
  


Reply

Tags
ipsec, strongswan



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
how to configure serverX to forward traffic incoming on port 80/tcp from desktopX to port on 5243/tcp. pratik11886 Linux - Certification 4 07-15-2016 01:34 PM
[solved]Redirect TCP port 25 to port 2525 sandilovely24 Linux - Security 2 02-03-2014 08:20 AM
How to see tcp port cristianpaul Linux - Networking 1 11-27-2006 06:31 PM
tcp port theory--help alaios Linux - Networking 3 12-17-2004 10:00 AM
close port 6000/tcp 515/tcp SchwipSchwap Linux - Newbie 1 09-12-2002 08:24 AM

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

All times are GMT -5. The time now is 06:27 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