PDA

View Full Version : POP3 problem


humanoid
5th September 2004, 06:52 PM
Hi,
I am totally new to Linux operating system. Recently, i've installed Fedora RC2 linux operating system and managed to setup a Local DNS, SMTP and POP3 server (referring to this guide: http://www.siliconvalleyccie.com/index.htm#Websites)The IP address for my linux machine is 192.168.0.1 and the domain name is fedora.com. When i was using linux Evolution Email client, i'm able to do both sending and retrieving emails which was sent by another computer (which is using windows xp, IP address = 192.168.0.2). When i was using outlook express (on my windows machine), I can only manage to send emails but was not able to retrieve any emails. The following are the settings for my outlook express:
POP3 address: 192.168.0.1
SMTP address: 192.168.0.1
Login: I'm using my linux login name and password

When i click the retrieve/send mail button, i get the following error:
Your server has unexpectedly terminated the connection. Possible causes for this include server problems, network problems, or a long period of inactivity. Account: '192.168.0.1', Server: '192.168.0.1', Protocol: POP3, Port: 110, Secure(SSL): No, Error Number: 0x800CCC0F

I've disabled windows xp firewall and the problem still occurs.

Can anyone help me please?

Vinny
5th September 2004, 08:53 PM
i guess it has timed out. this is a indication of routing. could be software config. i have searched through google with your error code. it seems to be consistent of time out. have you changed any settings? was it working ok before?
regards Vinny

imdeemvp
5th September 2004, 08:55 PM

who is your internet provider?......due to the hurricaine in florida verizon is experiencing problems.

humanoid
6th September 2004, 07:27 AM
@Vinny: Hi Vinny. I never get it to work before.

@imdeemvp: Hi imdeemvp, there's no problem with my isp. I'm using local area network connection.

I finally figure what's causing the trouble. The firewall of my linux machine is blocking the access of the port 110.
Anybody care to show me how to configure my iptables to allow the IP address 192.168.0.2 (the IP address of my windoze machine) to access to port 110 please? Thank you very much.

dave_kimberley
6th September 2004, 08:24 AM
Hi, something like the below firewall would do the trick:

# Location of the iptables
IPT=/sbin/iptables

# Network Interface to protect
INT="eth0"

# Clear out existing firewall rules
$IPT -F
$IPT -F INPUT
$IPT -F OUTPUT
$IPT -F FORWARD
$IPT -F -t mangle
$IPT -F -t nat
$IPT -X

# Setup the policies
$IPT -P INPUT DROP
$IPT -P OUTPUT ACCEPT
$IPT -P FORWARD ACCEPT

# Protect the fowarding rule.
$IPT -A FORWARD -i $INT -m state --state NEW,INVALID -j DROP

# Limit commands to cap the rate at which it alerts to 15 log messages per minute.
$IPT -N firewall
$IPT -A firewall -m limit --limit 15/minute -j LOG --log-prefix Firewall:
$IPT -A firewall -j DROP

# Now, our dropwall chain, for the final catchall filter.
$IPT -N dropwall
$IPT -A dropwall -m limit --limit 15/minute -j LOG --log-prefix Dropwall:
$IPT -A dropwall -j DROP

# Get the bad tcp fliags chain.
$IPT -N badflags
$IPT -A badflags -m limit --limit 15/minute -j LOG --log-prefix Badflags:
$IPT -A badflags -j DROP

# And our silent logging chain.
$IPT -N silent
$IPT -A silent -j DROP

# Below rules will accept connections from local machines.
$IPT -A INPUT -i lo -j ACCEPT
$IPT -A INPUT -s 192.168.0.2 -d 0/0 -p all -j ACCEPT

# Drop these packets. These are all TCP flag combinations that should never, ever occur. All of these are illegal combination
s that are used to attack a box in various ways, so we just drop them and log them here.
$IPT -A INPUT -p tcp --tcp-flags ALL FIN,URG,PSH -j badflags
$IPT -A INPUT -p tcp --tcp-flags ALL ALL -j badflags
$IPT -A INPUT -p tcp --tcp-flags ALL SYN,RST,ACK,FIN,URG -j badflags
$IPT -A INPUT -p tcp --tcp-flags ALL NONE -j badflags
$IPT -A INPUT -p tcp --tcp-flags SYN,RST SYN,RST -j badflags
$IPT -A INPUT -p tcp --tcp-flags SYN,FIN SYN,FIN -j badflags

# Drop icmp, but only after letting certain types through.
$IPT -A INPUT -p icmp --icmp-type 0 -j ACCEPT
$IPT -A INPUT -p icmp --icmp-type 3 -j ACCEPT
$IPT -A INPUT -p icmp --icmp-type 11 -j ACCEPT
$IPT -A INPUT -p icmp --icmp-type 8 -m limit --limit 1/second -j ACCEPT
$IPT -A INPUT -p icmp -j firewall

# Lets do some basic state-matching. This allows us to accept related and established connections, so client-side things like
ftp work properly, for example.
$IPT -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT

# Drop port 137 netbios packets silently.
$IPT -A INPUT -p udp --sport 137 --dport 137 -j silent

# Our final trap. Everything on INPUT goes to the dropwall # so we don't get silent drops.
$IPT -A INPUT -j dropwall

Vinny
6th September 2004, 08:47 AM
Dave im impressed. Can i also set up my server with the same rules?
i am in the process of setting up a fc2 server. i have accepted the default firewall settings for now?
Vinny

dave_kimberley
6th September 2004, 09:04 AM
The rules are fairly generic; I use them on my RH9 Clients and Fedora C2 Server fine.
:)

humanoid
6th September 2004, 09:13 AM
Thank you very much for your help Dave_Kimberley

nimrod-
6th December 2004, 06:56 PM
i am completely tired of installing over and over again every new distro of linux i've been able to download.. everything was fine with Red Hat 9 but the server crashed and i had to upgrade it.. RH is not updatable anymore.. so i thought i could use SuSe or Mandrake or even Fedora. Always the same problems,i can get it working, the mail server. With some tips i have read here i might do so.. thank you all..

UnrealizedPot
8th December 2004, 05:31 AM
Dont know if this is what you are looking for, but try out this how-to http://www.webconexion.net/knowledgebase/linux_howto/virtual_mail_server.php . I used it to set up a large virtual mail server and had no problems. There are a few typos in the how-to however they should be easy enough to spot. If you try it out and get stuck, let me know.