LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-27-2004, 04:48 AM   #1
paul.nel
Member
 
Registered: Nov 2003
Location: Cape Town
Distribution: Gentoo, Redhat 9, SuSE 9.0, 9.2, Win XP
Posts: 149

Rep: Reputation: 15
I can surf through my gateway but not send any emails?


This problem sort appeared out of nowhere. I use my rh9 box as a gateway with a firewall and then surf from my other machines on teh net including some WXP machines and other Linux boxes. For some reason I am not able to send any emails through from any machines other than my gateway? All machines can still surf no problem, just the sendign of email that is an issue?

Any ideas?

p.n
 
Old 11-27-2004, 07:08 AM   #2
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
please post the outputs of
#/sbin/iptables -nvL
#/sbin/iptables -nvL -t nat
 
Old 11-27-2004, 07:16 AM   #3
paul.nel
Member
 
Registered: Nov 2003
Location: Cape Town
Distribution: Gentoo, Redhat 9, SuSE 9.0, 9.2, Win XP
Posts: 149

Original Poster
Rep: Reputation: 15
Here it is:

# /sbin/iptables -nvL
Code:
Chain INPUT (policy ACCEPT 541K packets, 46M bytes)
 pkts bytes target     prot opt in     out     source               destination
 
Chain FORWARD (policy DROP 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
 6797 7984K ACCEPT     all  --  ippp0  eth0    0.0.0.0/0            0.0.0.0/0          state RELATED,ESTABLISHED
 6667  543K ACCEPT     all  --  eth0   ippp0   0.0.0.0/0            0.0.0.0/0
    0     0 LOG        all  --  *      *       0.0.0.0/0            0.0.0.0/0          LOG flags 0 level 4
 
Chain OUTPUT (policy ACCEPT 813K packets, 53M bytes)
 pkts bytes target     prot opt in     out     source               destination
#/sbin/iptables -nvL -t nat
Code:
Chain PREROUTING (policy ACCEPT 703 packets, 73479 bytes)
 pkts bytes target     prot opt in     out     source               destination
 
Chain POSTROUTING (policy ACCEPT 6712 packets, 409K bytes)
 pkts bytes target     prot opt in     out     source               destination
  939 60011 MASQUERADE  all  --  *      ippp0   0.0.0.0/0            0.0.0.0/0
 
Chain OUTPUT (policy ACCEPT 7519 packets, 461K bytes)
 pkts bytes target     prot opt in     out     source               destination
 
Old 11-27-2004, 10:07 AM   #4
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
i thougth your firewall could be block smtp port in FORWARD chain or something could be wrong in other chains, but it seems ok.
just im confused about ippp0. does ifconfig show "ippp0" or "ppp0" ?
but if clients can surf, this musnt be a issue.

sorry no more idea.

good luck.
 
Old 11-27-2004, 10:58 AM   #5
vald
LQ Newbie
 
Registered: Sep 2004
Location: Bulgaria
Distribution: Fedora
Posts: 14

Rep: Reputation: 0
may be the problem is MTU of ippp0 - it should be a bit small than ethernet's MTU (1500)... I'm not absolutely sure, but if "ifconfig ippp0" shows you that mtu is smaller than 1500 try this:

iptables -I FORWARD 1 -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
 
Old 11-27-2004, 11:23 AM   #6
paul.nel
Member
 
Registered: Nov 2003
Location: Cape Town
Distribution: Gentoo, Redhat 9, SuSE 9.0, 9.2, Win XP
Posts: 149

Original Poster
Rep: Reputation: 15
maxut: it's ippp0 'cause it is an ISDN and not a normal dialup modem

vald: MTU is 1500. It had worked in the past, that's what's bugging me.

p.n
 
Old 11-27-2004, 12:47 PM   #7
vald
LQ Newbie
 
Registered: Sep 2004
Location: Bulgaria
Distribution: Fedora
Posts: 14

Rep: Reputation: 0
it's seems everything is OK with your gateway...

where is the mail server?
on the gate or outside your LAN?
if the mail server is outside, can you trace with traceroute?
some interestring in the result of ping from the gate... may be ttl=1 or lost packets...

may be it's stupid things, but really have no idea what's the problem, sorry

P.S.: Sorry for my bad english
 
Old 11-28-2004, 02:22 AM   #8
paul.nel
Member
 
Registered: Nov 2003
Location: Cape Town
Distribution: Gentoo, Redhat 9, SuSE 9.0, 9.2, Win XP
Posts: 149

Original Poster
Rep: Reputation: 15
I am still not getting anywhere with this problem. I can ping the smtp server from the clients no problem. But everytime I send a message I get the following error message:

Code:
An error occured while sending mail. The mail server responded:
 <email@address.com>: Relay access denied. Please
 verify that your email address is correct in your mail 
Prefrences and try again
?

p.n
 
Old 11-28-2004, 07:28 AM   #9
vald
LQ Newbie
 
Registered: Sep 2004
Location: Bulgaria
Distribution: Fedora
Posts: 14

Rep: Reputation: 0
Is this problem appears only on sending?
I think problem is in the relay-access policy on the smtp server, on your gate everything is ok.
May be on the mail server is added header-check, or some other new anti-spam rules... sorry, at the present I'm not familiar with mail servers, just starting reading about postfix

May be the solution is to organize your own smtp-server on the gateway... or... just ask the mail-server administrator for some solution

P.S. Sorry for my bad english

Last edited by vald; 11-28-2004 at 07:38 AM.
 
Old 11-28-2004, 09:54 AM   #10
mardanian
Member
 
Registered: Mar 2004
Distribution: Fedora
Posts: 254

Rep: Reputation: 30
oki im here is a firewall wall script give it a try may be it solves your problem

to run the script do...

chmod +x scriptname

=========

./scriptname
!/bin/bash

# Rules for gateway

#Clear \ Flush all the rules from the different chains and tables

iptables --flush
iptables --flush INPUT #Flush the INPUT chain
iptables --flush OUTPUT #Flush the OUTPUT chain
iptables --flush FORWARD #Flush the FORWARD chain
iptables -t nat --flush #Flush the nat table
iptables -t mangle --flush #Flush the mangle table
iptables --delete-chain #Delete any pre-existing chains
iptables -t nat --delete-chain #Delete any pre-existing chains from nat table
iptables -t mangle --delete-chain #Delete any pre-existing chains from the mangle table

#Setting the default Policies for the chains
iptables --policy INPUT DROP #Setting the default policy for INPUT chain
iptables --policy FORWARD ACCEPT #Setting the default plicy for FORWARD chain
iptables --policy OUTPUT ACCEPT #Setting the default policy for the OUTPUT chain

#Accepting traffic for and to internal interface
iptables -A INPUT -i lo -j ACCEPT #Allowing unlimited loopback traffic
iptables -A OUTPUT -o lo -j ACCEPT #Allowing unlimited loopback traffic

# Using Connection State to By-Pass checking
# Creating the rules
#iptables -t nat -A POSTROUTING -o ippp0 -j MASQUERADE

iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A OUTPUT -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT

# Allowing ssh to remote servers

iptables -A OUTPUT -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -A FORWARD -p tcp --dport 22 -j ACCEPT

## Load FTP module --if iptables are not buildinto the kernel then uncomment the line below
modprobe ip_conntrack_ftp
modprobe ip_nat_ftp
########
echo 1 > /proc/sys/net/ipv4/ip_dynaddr #
echo 0 > /proc/sys/net/ipv4/conf/all/log_martians # Disable martians logging
echo 1 > /proc/sys/net/ipv4/ip_forward # Activate the forwarding
echo 1 > /proc/sys/net/ipv4/conf/all/proxy_arp
echo 1 > /proc/sys/net/ipv4/conf/all/rp_filter
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts # Don't respond to broadcast pings
echo 0 > /proc/sys/net/ipv4/conf/all/accept_source_route # Disable source routed packets
echo 0 > /proc/sys/net/ipv4/conf/all/accept_redirects # Disable ICMP Redirect Acceptance
echo 1 > /proc/sys/net/ipv4/tcp_syncookies # TCP syncookie protection
echo 1 > /proc/sys/net/ipv4/icmp_ignore_bogus_error_responses
echo 1800 > /proc/sys/net/ipv4/tcp_keepalive_time
echo 30 > /proc/sys/net/ipv4/tcp_fin_timeout

regards
 
Old 11-28-2004, 12:28 PM   #11
paul.nel
Member
 
Registered: Nov 2003
Location: Cape Town
Distribution: Gentoo, Redhat 9, SuSE 9.0, 9.2, Win XP
Posts: 149

Original Poster
Rep: Reputation: 15
OK, it was what most of us suspected in the end. My service provider made some changes to his mail server and that messed me around. Changed the corresponding settings and away I go....

Thanks for all the help.

Cheers
p.n
 
  


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
sendmail doesn't send emails outside dev_mohamed Linux - Networking 2 08-28-2005 03:42 PM
Can snort send emails? mikeghet Linux - Security 3 05-01-2005 07:40 PM
send 50-100 emails? codec Linux - Software 1 11-23-2004 07:28 AM
Can't recieve emails but can send them mosherben Linux - Software 12 08-10-2004 11:22 AM
Can't send or Receive Emails amohime Linux - Networking 4 04-11-2003 02:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

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