Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Port Forwarding (SMTP)

Posted on 2000-02-16
9
Medium Priority
?
455 Views
Last Modified: 2010-03-18
I have a linux system (Openlixe 2.2, 2.0.35 kernel) connected to the internet as well as a private LAN (10.0.0.1)

Also on the LAN is a mailserver (10.0.0.2)

I would like any traffic sent to the linux system on TCP port 25 to be forwarded to mail server.  What is the easiest way to do this?  

I've tried using the program redir, but it does not appear to be working... what should teh correct parameters for it be, and is there anything else that need to be set up for it to work?
0
Comment
Question by:syzygy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +2
9 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 2529814
I think if you'll take a look at section 6 of the IP Masquerade HowTo (http://howto.tucows.com/LDP/HOWTO/IP-Masquerade-HOWTO.html) you'll find what you need. There's a good discussion of forwarding and how to do it for simple services, like smtp, www, etc.
0
 
LVL 15

Accepted Solution

by:
samri earned 80 total points
ID: 2530090
syzygy,

     You also might want to take a look at rinetd (internet ``redirection server'').

     The source code and the documentation is available at
       
         http://www.boutell.com/rinetd/


Good luck,

Samri.
0
 
LVL 3

Expert Comment

by:alien_life_form
ID: 2531931
The way I do it is akin to the way
transparent proxying is done for
squid, and requires nothing
fancier than ipchains/ipfwadm depending if 2.0 or 2.2. The squid
docs (I don't have the URL) have
precise setup instructions - just
replace 80 with 25.
And, (if you use sendmail) disable identd lookup by setting the timeout
to zero in .cf (default is 30s), because identd does not take kindly this kind of redirection.

0
ATEN's HDBaseT Presentation at InfoComm 2017

Hear ATEN Product Manager YT Liang review HDBaseT technology, highlighting ATEN’s latest solutions as they relate to real-world applications during her presentation at the HDBaseT booth at InfoComm 2017.

 
LVL 1

Author Comment

by:syzygy
ID: 2533300
I've used samri's suggestion of rinetd, it works fine for TCP.


Now for bonus points, how do I do the same thing for UDP?  Now I find out I need to set up POP-3 as well.
0
 

Expert Comment

by:BlackSunSet
ID: 2533528
Whell I whouldn't do the forwarding with ipportfw or ipautofw because you open your self to DenailOfService attack so I whould use redir to redirect the trafic from the server to the local box,use 25 for SMTP and 110 for Pop3.

redir --lport=25 --cport=25 --laddr=(Internet_IP) --caddr=10.0.0.2 --syslog
redir --lport=110 --cport=110 --laddr=(Internet_IP) --caddr=10.0.0.2 --syslog

0
 
LVL 1

Author Comment

by:syzygy
ID: 2533581
redir only works with TCP, not UDP.
0
 
LVL 15

Expert Comment

by:samri
ID: 2533710
syzygy,
     beats me!.

    I guess I got to do another research on those. (hhmm.,. the bonus pints sounds rather attractive)


samri
0
 
LVL 3

Expert Comment

by:alien_life_form
ID: 2533982
I don't see how POP3 is related with
UDP. AFAIK, POP3 runs on TCP.
0
 

Expert Comment

by:BlackSunSet
ID: 2540313
syzygy: As Alien mentioned how does pop3 and smtp work with udp it beets me but next time if someone on your questions thanks be nice,
I sugest you start using Win since you don't know the difference between tcp and udp, pointing and clicking the mouse its always easier.
0

Featured Post

The Ideal Solution for Multi-Display Applications

Check out ATEN’s VS1912 12-Port DP Video Wall Media Player at InfoComm 2017. Kerri describes how easy it is to design creative video walls in asymmetric layouts and schedule detailed playlists ahead of time with its advanced scheduling feature.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question