I have OpenVPN configured on a Centos server and client can connect via OpenVPN client from their Windows box on port 1194. Clients get the gateway 10.0.8.1.
The problem is clients' boxes have viruses on their system and they are sending spam via my OpenVPN server; I just want to block port 25 for my clients.
I added the following rule in my iptables, which allows all traffic and drops port 25.
iptables -t nat -A PREROUTING -p tcp --dport 25 -j DROP iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
eth0 is the interface of the OpenVPN server.
But still it is sending spam.
Can anybody suggest how can I block the emails from my OpenVPN client machines?