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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IPTABLES setup / help please

Status
Not open for further replies.

Vince0000

MIS
May 30, 2002
46
CA
I have everything mail wise working (When the Firewall is disabled...)

I do the command iptables -F and then I can recieve and send mail ok but if enable the firewall settings with {service iptables restart} it resets the firewall settings and I can no longer send / recieve mail... so I got it down to the hosts.allow and hosts.deny tables now correct.

my HOSTS.ALLOW table is like this so far :

sendmail:ALL
ftp:127.0.0.1 192.168.1.
telnet:127.0.0.1 192.168.1.
auth:127.0.0.1 192.168.1.
192.168.1.

and my HOSTS.DENY table is :

ALL:ALL

--------------------------------------

Does iptables run off it's on table besides these 2? with my iptables active i can't connect with the above settings but if I flush it they work fine.

Thanks,
Vince
 
Code:
/etc/hosts.allow
and
Code:
/etc/hosts.deny
has nothing to do with your firewall. You need to open the ports in your firewall, like so:
Code:
# Accept SMTP
iptables -A INPUT -p tcp --dport 25 -j ACCEPT
# Accept POP3
iptables -A INPUT -p tcp --dport 110 -j ACCEPT

//Daniel
 
Thanks for the reply Danial I was just looking up those same commands and coming to realize the hosts.allow and deny weren't part of it either. Very much appreciated.

One reason I was thinking my hosts.allow and deny may be to blam is with the current setup above with ALL:ALL in the Deny file even on the server if I go Telnet localhost 110 I cannot get a connection... With or Without the firewall enabled. I removed that so the pop3 connection works and tested your 2 suggested commands though.

I Flushed the rules, Listed to be sure there empty, Restarted the iptables service and then manually added those 2 commands from the command line and did a listing... I can now see that on the INPUT chain bot say ACCEPT POP3 and SMTP but I still fail to be able to get a successfull send and recieve from the xp workstaion...

I test with telnet localhost 25 and telnet localhost 110 from the workstaion and it doesn't work as a extra verification. Works good on the Linux server of course though.

Thanks,
Vince
 
Telnetting to
Code:
localhost
on the workstation shouldn't work, as the Linux box isn't the
Code:
localhost
. Try telnetting to the IP of the Linux box, and see if you can connect.

//Daniel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top