Skip to main content

Newbie IPCOP SMTP Question

More
18 years 9 months ago #12859 by codiac
Hi All,

Sorry, but I am a bit of a newbie to this :?

We are running a public hotspot on our network (Zyxel G4100) which works very well at authenticating access via a printout with a randomly generated username and password. The AP is connected to the GREEN interface of the IPCOP box (v1.4.10) and the RED interface is connected directly to the router which in turn is connected to BT ADSL

I am having problems with clients using various email accounts who's SMTP settings differ from BT's SMTP server (smtp.btclick.com); this is resulting in 550 relay errors when they are sending emails.

are there any plugins or modifications that will allow me to re-route SMTP traffic on port 25 from the GREEN interface to BT's SMTP server on the Red interface in IPCOP without generating any 550 errors?

Any workaround would be greatly appreciated

As you may notice, I am a real newbie at this, I understand that I maybe able to modify the iptable thingies to reroute?!?, if so could you explain in idiot terms what I need to change and how to access it please


I read this elswhere:

I'm trying to redirect all mail packets (POP3 and SMTP) in the local network to a specific host. I'm trying with the following rules:

Code:

## Changes destination address of the smtp packets,
## port 25
iptables -v -t nat -A PREROUTING -p tcp --dport 25 -i eth0 -j DNAT --to 192.168.12.1:25

## Changes destination address of the pop3 packets,
## port 110
iptables -v -t nat -A PREROUTING -p tcp --dport 110 -i eth0 -j DNAT --to 192.168.1.197:110



it appears this cant be done because the source and destination addresses are both in the same subnet (GREEN). can it be done on the RED using BT's smtp's ip address?

bear in mind I have no idea where to find the file to edit :oops:

Im sorry if this is a stupid question and there is a simple solution, but im pulling my hair out with this one and my boss is currently aiming his foot at my ass :shock:

Thanks guys

J
More
18 years 9 months ago #12892 by DaLight
Welcome to firewall.cx, codiac. Add the following command to your rc.local file, which is located in "/etc/rc.d".

[code:1]iptables -v -t nat -A PREROUTING -p tcp --dport 25 -i eth0 -j DNAT --to x.x.x.x:25 [/code:1]
where x.x.x.x is the IP address of the BT smtp server.
More
18 years 9 months ago #12897 by codiac
Thanks DaLight!

My ass can now activate chaff and flares :lol:

Seriously I really appreciate the help, I will get my head round this stuff if it kills me :oops:
More
18 years 9 months ago #12898 by DaLight
Let us know how it goes.
More
18 years 9 months ago #12899 by codiac
All working perfectly :D

All traffic on port 25 passing through the firewall now redirects to the specified smtp server no problems at all!

Thanks again :wink:

J
Time to create page: 0.128 seconds