LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices



Reply
 
Search this Thread
Old 12-01-2005, 10:55 PM   #1
ziggie216
Member
 
Registered: Oct 2003
Posts: 176

Rep: Reputation: 30
Is it not possible to route incomming port to another external port?


i'm been toying with iptables foward trying to figure out how I can router incomming port 3333 from external connection -> external ip:25

My school here blocks port 25 so I am unable to send email using my smtp host. I was hoping that there is a way I can connect to my linuxbox port 3333 and it would route to a smtp host.

I know there are services like no-ip.com that does this, but I rather save a few dollars for something I wont be using all the time.
 
Old 12-02-2005, 09:45 AM   #2
syavne
LQ Newbie
 
Registered: Jun 2004
Distribution: Fedora Core
Posts: 9

Rep: Reputation: 0
I used to do something similar, if I remember well you need to run this:

iptables -t nat -A PREROUTING -i eth0 -p tcp -d 0.0.0.0 --destination-ports 3333 -j DNAT --to-destination 1.1.1.1:25

Just change 0.0.0.0 to the ip address of your linuxbox (on the internet) and 1.1.1.1 to the ip address of your SMTP host.

Have you tryed SSH tunneling?, it may be more useful.
 
Old 12-02-2005, 04:21 PM   #3
ziggie216
Member
 
Registered: Oct 2003
Posts: 176

Original Poster
Rep: Reputation: 30
yea I tired the ssh tunneling, but I didnt want to bother with logging on through ssh just to send some mail.

thanks for the iptable info.. i'll try it out
 
Old 12-02-2005, 04:56 PM   #4
OldSarge
Member
 
Registered: Jul 2003
Posts: 56

Rep: Reputation: 15
I do not even know where to begin. I have a D-Link external router, which allows me access to my Toshiba cable modem for both my WinXP box and my SuSe 9.2 Pro box. Problem is getting the two boxes to talk to one another. How do I go about doing that?
 
Old 12-02-2005, 11:05 PM   #5
ziggie216
Member
 
Registered: Oct 2003
Posts: 176

Original Poster
Rep: Reputation: 30
Nope that rule doesnt work. iptables -t nat -A PREROUTING -i eth0 -p tcp -d 0.0.0.0 --destination-port 3333 -j DNAT --to-destination 1.1.1.1:25

with the ip changed


OldSarge - both system are unable to ping each other?
 
Old 12-03-2005, 07:16 PM   #6
OldSarge
Member
 
Registered: Jul 2003
Posts: 56

Rep: Reputation: 15
networking with a router

To Ziggie: I do not know how to get them to ping each other.
 
  


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
Iptables - incomming port to external port - possible? ziggie216 Linux - Software 1 07-13-2006 03:08 PM
route locally generated traffic to ip:port to localhost:port maenho Linux - Software 2 03-11-2005 05:08 AM
Guarddog : opening port for incomming connection omry_y Debian 21 10-03-2004 03:29 PM
Log incomming data from a serial port shoekstr Linux - Hardware 6 05-28-2004 11:53 AM
port 25 for both incomming and outgonig mail? ziggie216 Linux - Software 6 12-24-2003 04:35 AM


All times are GMT -5. The time now is 02:04 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration