Click to See Complete Forum and Search --> : Recieving mail thru IP chains
chris31_80
06-14-2001, 01:50 PM
What? What do I mean about that? WTF are you talking about?
Right now, I can't recieve e-mails (I can send them) because of what I think is the built in firewall in RH 7.1. Is this something I can fix easily from the terminal? Talk to me people! :)
[GoRN]
06-14-2001, 01:53 PM
ipchains -I input 1 -p tcp --dpt 25 -j ACCEPT
i think thats right, but i'm used to iptables.
also try ps -aux | grep sendmail
and netstat -ant | grep 25
post the results.
chris31_80
06-15-2001, 12:26 AM
Originally posted by [GoRN]:
<STRONG>ipchains -I input 1 -p tcp --dpt 25 -j ACCEPT
i think thats right, but i'm used to iptables.
also try ps -aux | grep sendmail
and netstat -ant | grep 25
post the results.</STRONG>
ipchains command wasn't recognized.
-aux | grep sendmail:
root 816 0.0 0.7 5028 2016 ? S 21:07 0:00 sendmail:accepting
root 1187 0.0 0.2 1620 592 pts/0 S 21:14 0:00 grep sendmail
the last command:
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
:confused:
chris31_80
06-15-2001, 02:03 PM
bump. come on guys. :mad:
Craig McPherson
06-15-2001, 06:43 PM
Okay. You have Sendmail running on the machine.
Now, what happens when you try to telnet to port 25 of the machine from a remote system on the Internet? Do you get a Sendmail banner, or do you get an immediate "connection denied", or do you get nothing until the connection times out, or do you get a "Connection closed by foreign host"?
Of those 4, if it's #2 or #3, then your firewall likely IS the cause. Your firewall should allow the following things:
1. Remote systems to send (from both unprivports and port 25) to port 25 on your machine.
2. Remote machines to send (non-SYN) from port 25 to unprivports on your machine.
3. Your machine to send (from both unprivports and port 25) to unprivports and port 25 on remote machines.
That should cover all your bases.
chris31_80
06-15-2001, 08:55 PM
Craig, is there anyway to look up a log in IPCHAINS to see if this is the case?
Craig McPherson
06-15-2001, 11:28 PM
I think "ipchains -L" will show you the current ruleset. Check the ipchains manpage if that's not right; I've been using iptables so much I've forgotten the ipchains syntax.
If you need help with ipchains, check out http://www.linux-firewall-tools.com/. They have documents and guides there, in addition to a firewall generation tool.
chris31_80
06-16-2001, 01:04 AM
Thanks! :D
chris31_80
06-16-2001, 12:49 PM
Wait a minute, the RH 7.1 book said that it uses IP Tables. hmmmm. I think it's PacBell that's giving me problems.
Psycho
06-16-2001, 07:03 PM
RH7.1 has IPChains and IPTables, the default firewall setup uses IPChains.
--glenn
Craig McPherson
06-16-2001, 10:56 PM
It might have userspace tools for both installed, but the userspace tools are not the firewall. The firewall is inside the kernel itself, and any 2.4 kernel can only have *either* iptables or ipchains built in -- not both. Iptables is 2.4's native firewall, but a 2.4 kernel can have ipchains built in instead, for backwards compatibility, but not both at once.
The ipchains command to open port 25 to the world is:
ipchains -A input -p tcp -s 0/0 25 -j ACCEPT
chris31_80
06-17-2001, 01:04 AM
Thanks guys. It works now. Guess what the problem was? I changed my password and forgot what it was! I must have been drinking that night. LOL! :D