Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Port Redirection

Status
Not open for further replies.

cleaner416

Programmer
Feb 5, 2002
42
US
I have a simple Red Hat 7.2 box running. I would like to redirect all mail requests to another IP/PORT. The box only has one network interface, so it's not a router. In other words, I want all requests to IP1/25 to got to IP2/25 and the same with 110.

Can I do this through ipchains? If so, what is the syntax (or something close to it?) Thanks!
 
Set up your DNS "MX" record to point to the new IP then edit /etc/mail/sendmail.mc. Look for a line that starts with DAEMON_OPTIONS then change it to the new ip then run m4 and you should be ready to go.
 
Thanks, Rhythm. Do you mean my MX record at my registrar? I don't want to change that since IP2 is dynamically assigned. I was hoping to keep the MX record pointing at IP1, and then when mail traffic hits IP1, have it routed to IP2. That way, when IP2 changes, I could simply change the routing scheme in to use the new IP2 address. Chaning at the registrar level involves that 24-48 hr propagation thing, and IP2 (dynamic) gets changed once a week.

Do you still think this can be accomplished through sendmail? Or should I still be looking into ipchains for the solution?

Thanks for your help!
 
Check out . You can change ip's as often as you like and the change will take effect instantly. Once you setup an account with Zone Edit, tell your registrar to switch your dns servers from theirs to zone edit's. They will let you have up to 5 zones (domains) for free. I've had them for a few years now and I love it. I don't have to fill out requests to make changes and the big thing is, I don't have to wait. You will however have to wait for your registrar to change over to your new dns servers but after that, it's smoothe sailin'. There may be dns pointer services that will do this for you automatically but there is usually a cost involved. As for ipchains that won't do anything for you. It only opens, closes or restricts ports on your system or network. e-mail, just like a web address, needs to be listed on a dns server. The dns "A" record is for domains and sub-domains and dns "MX" record is for e-mail. To make a long story short, if an address doesn't resolve to the ip of your server, all the configuring in the world ain't gonna help. Dig where I'm coming from? :eek:) Hope this clears things up a bit.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top