LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 05-02-2002, 04:18 PM   #1
The Jesus
Member
 
Registered: Mar 2002
Location: Cleveland, Ohio
Distribution: Ubuntu, Gentoo, Fedora Core 5, FreeBSD
Posts: 50

Rep: Reputation: 15
Exclamation Mail Relay problem IPCHAINS


Here is my scenario. I have a mail server 192.168.1.2. I have a proxy/firewall server 192.168.1.1. The proxy/firewall server is running Redhat 7.2 and I have my firewall configured through ipchains. On my mail server I am allowing message relays from 192.168.1.0. I have the proxy/firewall server set to forward all traffic on port 25 on my outside address to the mail server 192.168.1.2. All forwarding that I have set up is done with XINETD. This is where the problem comes, everything works fine except that I am still showing up as an open relay. I need to set up my firewall to allow traffic to be forwarded from my outside address to the mail server without people being able to spoof the IP and send through my mail server. What is the best way to forward the traffic from port 25 on my outside address to my mail server on an inside address without me being an open relay? What is an example of a rule I could add to my firewall to stop this. Thanks.

Last edited by The Jesus; 05-02-2002 at 04:19 PM.
 
Old 05-03-2002, 01:51 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
AFAIC, relaying is an MTA thing, so except for adding the Class A and B addresses to the outside eth device like:
iptables -A INPUT -i eth0 -s 192.168.0.0/16 -j DROP
iptables -A INPUT -i eth0 -s 10.0.0.0/8 -j DROP
iptables -A INPUT -i eth0 -s 172.16.0.0/12 -j DROP
iptables -A INPUT -i eth0 -s 255.255.255.255 -j DROP
iptables -A INPUT -i eth0 -s 127.0.0.0/8 -j DROP
iptables -A INPUT -i eth0 -s 0.0.0.0/8 -j DROP
iptables -A INPUT -i eth0 -s 169.254.0.0/16 -j DROP
iptables -A INPUT -i eth0 -s 224.0.0.0/4 -j DROP
iptables -A INPUT -i eth0 -s 240.0.0.0/5 -j DROP
iptables -A INPUT -i eth0 -s 248.0.0.0/5 -j DROP
you'll have to configure Sendmail to disallow relaying.
 
Old 05-03-2002, 05:02 AM   #3
jester_69
Member
 
Registered: May 2002
Location: Sydney Australia
Distribution: Redhat 6.1 & 7.2
Posts: 91

Rep: Reputation: 15
My thoughts exactly
 
  


Reply



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
Postfix as a mail relay (getting relay access denied) hypexr Linux - Software 3 09-13-2005 07:15 PM
relay mail to sendmail relay server??? lemay_jeff Linux - Newbie 0 07-06-2004 04:54 PM
mail relay problem with sendmail ilovebytes Linux - Networking 5 11-16-2003 07:56 AM
Sendmail relay mail problem Swift&Smart Linux - Software 15 10-30-2003 09:14 PM
mail relay problem.. chuck77 Linux - General 3 07-20-2002 08:03 PM

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

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