Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-31-2005, 03:05 AM   #1
LQ Newbie
Registered: May 2005
Posts: 7

Rep: Reputation: 0
Masquerading and SMTP


I have two quetions if someone can help me:

1. On a RH9 web server I did the masquerading by using:

$> modprobe ipt_MASQUERADE
$> iptables -F; iptables -t nat -F; iptables -t mangle -F
$> iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to < external IP >
$> echo 1 > /proc/sys/net/ipv4/ip_forward
$> iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
$> iptables -A INPUT -m state --state NEW -i ! eth1 -j ACCEPT
$> iptables -P INPUT DROP
$> iptables -A FORWARD -i eth1 -o eth1 -j REJECT

Everything looks fine, the Windows network clients are able to connect to the Internet but when I'm restarting the server, all of the upper setting are lost and I have to start the masquerading sequence from the beginning.

My question: How can I avoid masquerading settings to be lost on a server restart?


2. I set up the mail server using sendmail.

- I can send e-mails from our domain to external addresses;
- I can send e-mails from internal to internal;


- I cannot receive emails from external addresses.

What should I check? I am new in the field so please be bear with me.

Thank you very much for your help.

Old 05-31-2005, 03:52 AM   #2
Registered: Aug 2004
Distribution: Gentoo, Suse, Fedora, Debian
Posts: 86

Rep: Reputation: 15
after you boot up next time... configure the iptables with all the commands you have...
now do this
#>service iptables save
#>chkconfig iptables on

reboot and njoy


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
SMTP "open relay" and SMTP AUTH aikempshall Linux - Security 3 10-11-2006 08:19 AM
IP Masquerading mugwump84 Linux - Newbie 5 05-03-2005 09:30 AM
Postfis SMTP forwarding and Incoming SMTP pheasand Linux - Software 0 04-27-2005 05:32 PM
Exim masquerading mail to AOL users with broadband SMTP server llamakc Linux - General 0 12-13-2003 08:58 AM
SMTP and KMail and SMTP and Netscape Mail jazz... Linux - Newbie 5 10-11-2003 03:49 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:22 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration