Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.networking > #4164 > unrolled thread

Port forwarding over VPN

Started byClark Smith <noaddress@nowhere.net>
First post2018-06-30 22:08 +0000
Last post2018-07-01 09:39 +0200
Articles 5 — 5 participants

Back to article view | Back to comp.os.linux.networking


Contents

  Port forwarding over VPN Clark Smith <noaddress@nowhere.net> - 2018-06-30 22:08 +0000
    Re: Port forwarding over VPN William Unruh <unruh@invalid.ca> - 2018-06-30 23:46 +0000
    Re: Port forwarding over VPN Pascal Hambourg <pascal@plouf.fr.eu.org> - 2018-07-01 09:19 +0200
      Re: Port forwarding over VPN Jorgen Grahn <grahn+nntp@snipabacken.se> - 2018-07-12 12:57 +0000
    Re: Port forwarding over VPN Wouter Verhelst <w@uter.be> - 2018-07-01 09:39 +0200

#4164 — Port forwarding over VPN

FromClark Smith <noaddress@nowhere.net>
Date2018-06-30 22:08 +0000
SubjectPort forwarding over VPN
Message-ID<ph8v03$a5p$1@news.albasani.net>
	I have been stummped with this for a while; I thought it'd be 
relatively easy, but I have been unable to pull it off.

	I have a Linux box A that communicates with another Linux box 
over a VPN. I can access B from A without any problems. What I want to 
achieve is the following:

	In B there is a UDP application that listens for data on port p1. 
What I would like to do is to access this application from A, but using 
port p2, rather than p1 (don't ask why, please). I imagined this would be 
a simple thing to do with iptables, but I obviously overestimated my 
understanding of iptables.

	Any suggestions on how to proceed?

[toc] | [next] | [standalone]


#4165

FromWilliam Unruh <unruh@invalid.ca>
Date2018-06-30 23:46 +0000
Message-ID<ph94of$ppc$1@dont-email.me>
In reply to#4164
On 2018-06-30, Clark Smith <noaddress@nowhere.net> wrote:
> 	I have been stummped with this for a while; I thought it'd be 
> relatively easy, but I have been unable to pull it off.
>
> 	I have a Linux box A that communicates with another Linux box 
> over a VPN. I can access B from A without any problems. What I want to 
> achieve is the following:
>
> 	In B there is a UDP application that listens for data on port p1. 
> What I would like to do is to access this application from A, but using 
> port p2, rather than p1 (don't ask why, please). I imagined this would be 

port p2 on what machine?

Again younare presenting a solution, and demanding how to accomplish it rather
than a problem, and asking for a solution.


> a simple thing to do with iptables, but I obviously overestimated my 
> understanding of iptables.
>
> 	Any suggestions on how to proceed?

[toc] | [prev] | [next] | [standalone]


#4166

FromPascal Hambourg <pascal@plouf.fr.eu.org>
Date2018-07-01 09:19 +0200
Message-ID<ph9vaq$2nvi$1@saria.nerim.net>
In reply to#4164
Le 01/07/2018 à 00:08, Clark Smith a écrit :
> 
> 	I have a Linux box A that communicates with another Linux box
> over a VPN. I can access B from A without any problems. What I want to
> achieve is the following:

What kind of VPN ?

> 	In B there is a UDP application that listens for data on port p1.

On what address(es) ?

> What I would like to do is to access this application from A, but using
> port p2, rather than p1 (don't ask why, please).

On what address ?

> I imagined this would be a simple thing to do with iptables

NAT/PAT is never simple.
Have you considered using a UDP relay/proxy instead ?

[toc] | [prev] | [next] | [standalone]


#4168

FromJorgen Grahn <grahn+nntp@snipabacken.se>
Date2018-07-12 12:57 +0000
Message-ID<slrnpkek1o.31ka.grahn+nntp@frailea.sa.invalid>
In reply to#4166
On Sun, 2018-07-01, Pascal Hambourg wrote:
> Le 01/07/2018 à 00:08, Clark Smith a écrit :
>> 
>> 	I have a Linux box A that communicates with another Linux box
>> over a VPN. I can access B from A without any problems. What I want to
>> achieve is the following:
>
> What kind of VPN ?

I assume the VPN is a red herring: he has full IP (or IPv6)
connectivity between A and B and the problem is at a higher protocol
layer (unless he forgot to mention a firewalling/NAT issue).

/Jorgen

-- 
  // Jorgen Grahn <grahn@  Oo  o.   .     .
\X/     snipabacken.se>   O  o   .

[toc] | [prev] | [next] | [standalone]


#4167

FromWouter Verhelst <w@uter.be>
Date2018-07-01 09:39 +0200
Message-ID<d2dm0f-ef4.ln1@gangtai.home.grep.be>
In reply to#4164
On 01-07-18 00:08, Clark Smith wrote:
> 	I have been stummped with this for a while; I thought it'd be 
> relatively easy, but I have been unable to pull it off.
> 
> 	I have a Linux box A that communicates with another Linux box 
> over a VPN. I can access B from A without any problems. What I want to 
> achieve is the following:
> 
> 	In B there is a UDP application that listens for data on port p1. 
> What I would like to do is to access this application from A, but using 
> port p2, rather than p1 (don't ask why, please).

I'm still going to ask ;-P

This seems like a fairly weird requirement, and I suspect this is a bad
case of an XY problem[1]. If you explain what it is exactly that you're
trying to do, rather than "redirect a port", then I'm reasonably certain
you'll get a better answer.

[1] https://meta.stackexchange.com/questions/66377/what-is-the-xy-problem

> I imagined this would be 
> a simple thing to do with iptables, but I obviously overestimated my 
> understanding of iptables.

It is. You need to use the nat table (-t nat) and either DNAT or SNAT,
depending on where you want to redirect the port.

What have you tried so far? Why didn't it work?

Will the redirection need to happen on machine A or on machine B?

> 	Any suggestions on how to proceed?

Provide some more details first.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.os.linux.networking


csiph-web