• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 239
  • Last Modified:

using ip tables to allow windows mail server to work.

Hi EE.  I just managed to configure my lan with linux as a router.  I have a simple firewall router connected to my internet link and my linux box connected to the router.  my lan is then connected to the linux box on eth1.  So Internet is working.  However my mail server sits on one of the linux boxes.  The router forwards data on port 25 and 110 to a pc on the lan, but since they are on different ip range - 10.0.0.1 for the router and 192.168.0.2 for the pc.  How can I get mail to work?

Thanks

0
aduhwale
Asked:
aduhwale
  • 3
  • 2
1 Solution
 
ahoffmannCommented:
the router needs to pass port 25 to the linux box and block port 110 (except you wont to use horrible insecure POP over internet).
then you PC needs to send mails to your linux box and query it for recieving mails using pop
(assuming that the linux box is your MTA and all PCs are MUAs)
0
 
aduhwaleAuthor Commented:
Hi.  My scenario is this.  My mail server is running on one of the windows clients.  So before I put in the linux box, the router was connected on the switch and all the windows pcs connected via this.  The router had ports 25 and 110 forwarded to the windows pc with the mail server program.  So I am looking for a way to avoid using the linux box for any portion of the mail and  just have my ports forwarded as before.
0
 
ahoffmannCommented:
so your network topology is now:

internet -- router --- (eth0) linux box (eth1) --- M$ pc with MTA

then you need to configure your router to pass port 25 to ip of eth0
and on linux box you need a port forwarding like:
  iptables -t nat PREROUTING -i eth0 --dport 25 --to-destination ip-of-winbox:25 -j DNAT
0
 
aduhwaleAuthor Commented:
ur a star.  thanks.
0
 
ahoffmannCommented:
keep in mind that my iptables suggestion assumes that traffic from eth1 is routed though to eth0 without (much) problems, in particular port 25 so that you MTA can caal other mail servers
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now