Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 03-11-2005, 03:58 AM   #1
Registered: Nov 2003
Location: Belgium
Posts: 81

Rep: Reputation: 15
route locally generated traffic to ip:port to localhost:port


For reasons to complex to explain I would like that if a local application requests for example to connect to it actually connects to (or different port). How would I do this?
Old 03-11-2005, 05:03 AM   #2
LQ Guru
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
u need to resolve the DNS locally i think
Old 03-11-2005, 05:08 AM   #3
Registered: Sep 2003
Location: Bulgaria
Distribution: Ubuntu 9.10, FreeBSD 7.2
Posts: 459

Rep: Reputation: 31
You can use iptables and the OUTPUT chain and nat to redirect the request:
iptables -t nat -A OUTPUT -m tcp -p tcp -d --dport 80 -j DNAT --to-destination


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
Is it not possible to route incomming port to another external port? ziggie216 Linux - Software 5 12-03-2005 07:16 PM
Port 25: No route to host dhruv Linux - Networking 4 04-07-2004 09:23 AM
Port 25: No route to host dhruv Linux - Newbie 0 04-03-2004 10:37 AM
ProFTPd - can connect locally but...Could it be that Verizon DSL does not allow port cevjr Linux - Networking 5 02-22-2004 05:42 PM
localhost:port sodhilogin Linux - General 7 05-14-2003 08:20 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:10 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration