LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 02-07-2006, 03:43 AM   #1
baetmaen
LQ Newbie
 
Registered: Aug 2004
Location: Germany, HE
Posts: 12

Rep: Reputation: 0
Forward SMTP to another server (SuSE with iptables)


Hi,

in the moment, I'm moving my root server to a new one. During this action, I want to loose not too much mails

I want to forward incoming connections on the old server to the new server. This should be possible, or am I wrong ?

I'm not very familiar with iptables. My firewall script was written by a friend of me. I only understand a little bit and I did try forwarding some time ago, without success. Here is the rule, that allows incoming SMTP connections on the old server.
What has to be changed to forward these connections to lets say IP 10.10.10.10 ?

Code:
iptables -A INPUT -i eth0 -m state --state NEW -p tcp --dport 25 -j ACCEPT
Thanks a lot
Joerg
 
Old 02-07-2006, 06:14 AM   #2
baetmaen
LQ Newbie
 
Registered: Aug 2004
Location: Germany, HE
Posts: 12

Original Poster
Rep: Reputation: 0
Problem solved !

I configured rinetd to forward everything from the old to the new Server

Cya
Joerg
 
Old 02-11-2006, 03:05 PM   #3
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally Posted by baetmaen
What has to be changed to forward these connections to lets say IP 10.10.10.10 ?

Code:
iptables -A INPUT -i eth0 -m state --state NEW -p tcp --dport 25 -j ACCEPT
well, even though you already worked this out, here's more or less the iptables commands you would have had to use, in case it might be helpful to someone:

Code:
iptables -t nat -A PREROUTING -p TCP -i eth0 --dport 25 -j DNAT \
--to-destination 10.10.10.10

iptables -A FORWARD -p TCP -i eth0 -d 10.10.10.10 --dport 25 j ACCEPT
 
  


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
using sendmail to forward to a remote smtp server selgip Linux - Software 1 03-21-2005 06:04 PM
qmail SMTP forward question.... rabbate Linux - General 2 04-01-2004 02:27 PM
Looking for pop3 client and smtp forward HSukirman Linux - Newbie 5 03-30-2004 08:03 AM
iptables - change port and forward to a internal server leandrok Linux - Networking 0 01-16-2004 10:52 AM
need sendmail to forward to ISPs SMTP uem-Tux Linux - Software 1 08-17-2003 08:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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