1

I have openvpn configured on the centos server and client can connect via openvpn client from there windows box on port 1194. Clients gets the gateway 10.0.8.1.

The problem is that client boxes have viruses on there system and they sending spams via openvpn server so I just want to block that spams and port 25 for my clients.

I added the following rule in my iptables, which is allowing all traffic and dropping 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 its still sending spam.

Can anybody suggest how can i block the spams/emails from my openvpn client machines?

Thanks.

1 Answer 1

3

Correct rules:

iptables -A FORWARD -p tcp --dport 25 -s CLIENT_IP_NETWORK -j DROP

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .