LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 02-03-2015, 10:09 PM   #1
jpresto
LQ Newbie
 
Registered: Jul 2006
Posts: 2

Rep: Reputation: 0
Directing port traffic from interface to localhost


I have a mongodb process which I'm unable to change the config on and it's bound to localhost only. I'd like to connect to it from another system.

I may have exhausted my options for trying to change the config file - is there any way to route tcp a single port's traffic from eth1 over to localhost?

Thanks in advance - Joe
 
Old 02-03-2015, 11:36 PM   #2
Miati
Member
 
Registered: Dec 2014
Distribution: Linux Mint 17.*
Posts: 326

Rep: Reputation: 106Reputation: 106
Quote:
route tcp a single port's traffic from eth1 over to localhost?
Might try ssh forwarding. You will need ssh access with TCPForwarding set to yes for this to work.

Code:
ssh -R remoteip:remoteport:localip:localport hostname
This will forward all traffic going to the remote port to the local port you specifiy.

Quote:
I may have exhausted my options for trying to change the config file
Do you own the system? Generally, subverting security is not a way to get on people's good side.
Just saying

Last edited by Miati; 02-03-2015 at 11:42 PM.
 
Old 02-04-2015, 12:50 PM   #3
jpresto
LQ Newbie
 
Registered: Jul 2006
Posts: 2

Original Poster
Rep: Reputation: 0
My systems. Background is this is a unifi controller and it launches mongodb without any way to change the bind address. I want it on an IP so I can connect to it via an ODBC driver on a windows box.

I'd rather avoid using SSH on the remote side.. and forgive linux ignorance, but perhaps iptables??
 
Old 02-04-2015, 02:08 PM   #4
Miati
Member
 
Registered: Dec 2014
Distribution: Linux Mint 17.*
Posts: 326

Rep: Reputation: 106Reputation: 106
You could likely port forward using iptables so that external devices can connect

But if the process is localhost bound, then a connection by a external ip will not work. Since you can't seem to change that behavior, the only way I know would be to "trick" it, using ssh.
If windows is involved though, I can't say whether it would work or not.

However, someone else may have an idea.
 
  


Reply



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
[SOLVED] Directing traffic through multiple interfaces goumba Linux - Networking 4 05-12-2013 06:48 AM
Is this possible ?? - IP traffic re-directing mykstar Linux - Networking 2 10-02-2012 11:21 AM
Routing traffic by port number to specific interface meekamoo Linux - Networking 3 01-17-2011 08:14 AM
Port forwarding: Directing traffic to a ssh client JustinKubicek Linux - Newbie 5 05-31-2009 12:00 PM
route locally generated traffic to ip:port to localhost:port maenho Linux - Software 2 03-11-2005 04:08 AM

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

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