LinuxQuestions.org
Help answer threads with 0 replies.
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 05-26-2017, 09:58 PM   #1
serberus7
LQ Newbie
 
Registered: May 2017
Posts: 2

Rep: Reputation: Disabled
External Port Forwarding?


I have linux box A on network 1
I have port 123 forwarded to linux box A on network 1.

Currently Linux box A is not listening for port 123

I have linux box B on network 2
Linux box B is listening for port 123, and port 123 is forwarded to Linux box B on network 2.
and I can currently connect using Network2:123 from an outside network, but I need to be able to connect to the same box using network1:123.

What I need to do is tell Linux box A to forward all incoming traffic on network 1 on port 123 to network 2 on port 123 and be a middle man for communications, but only port 123.

I've looked into SSH tunneling and iptables but I can't quite seem to get it right, could someone help me out?

incoming packets need to do this: Traffic -> Network1:123 -> Linux Box A -> Network2:123 -> Linux Box B
Outgoing packets need to do this: Linux Box B -> Network2:123 -> Linux Box A -> Network1:123 -> Traffic

I hope this makes sense...

Last edited by serberus7; 05-26-2017 at 10:03 PM.
 
Old 05-31-2017, 08:50 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,528

Rep: Reputation: 7247Reputation: 7247Reputation: 7247Reputation: 7247Reputation: 7247Reputation: 7247Reputation: 7247Reputation: 7247Reputation: 7247Reputation: 7247Reputation: 7247
looks like there are some confusions ....
network has no port, you cannot forward that anywhere. You always must have a host and hosts have ports (router is a host too).
 
Old 05-31-2017, 12:46 PM   #3
serberus7
LQ Newbie
 
Registered: May 2017
Posts: 2

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
looks like there are some confusions ....
network has no port, you cannot forward that anywhere. You always must have a host and hosts have ports (router is a host too).
no theres a way to do this. I have two buildings two isps.
Im the client connecting to network 1 on port 123. I just want network 1 to send that connection to network 2 in another building.
This way the client can communicate with network 2 on port 123 but only by telling network 1.

Pretend the buidlings have no inter linked networking harware the only way they can communicate is by external wan ip

Last edited by serberus7; 05-31-2017 at 12:47 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Shorewall: port forwarding problem, port is closed even after forwarding Synt4x_3rr0r Linux - Networking 2 12-13-2009 05:36 PM
Connect from home to a computer inside an "external" LAN using port forwarding horacioemilio Linux - Networking 1 03-07-2008 04:36 AM
Questions regarding external IP & port forwarding deke7777 Linux - Server 6 05-31-2007 08:55 PM
IPCHAINS port forwarding and IPTABLES port forwarding ediestajr Linux - Networking 26 01-14-2007 08:35 PM
External port forwarding to an internal host antken Linux - Networking 3 12-17-2006 10:43 AM

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

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