>Traffic is coming IN on port 5025 and needs to be resend (out) to
>port 25 on the same interface.
>my providers smtp server
Outgoing email?
You mean port 25 on a remote computer, not listening on the interface.
You need to be very carefull that you don't leave a mail relay accessable from the internet.
You could do it with iptables or with
portfwd
with somthing like this, fill in the numeric ip address of you ISP's mail server.
Change 192.168.0.0/16 if you are using a different range of lan addresses eg 10.0.0.0/8
/*
* mailrelay.cfg
*
* Forward all connections on TCP port 5025 to 1.2.3.4:25 */
tcp { 192.168.0.0/16:5025 { => 1.2.3.4:25 } }
/*
* eof: mailrelay.cfg
*/
Portfwd is somtimes usfull because you can run it without root access, though without root you can't usually listen on ports 1-1024.
>filter on MAC address so only my computer can send data to this port ?
That can probably be done with an iptables rules