I’m new to iptables and much of the tutorials I find are not quite clear. What series of iptables commands would I use to do the following?

By default deny all traffic not from localhost.
Accept all traffic from the local network (let’s say 123.123.*.* for example) to TCP ports 139,445,110
Accept all traffic from anywhere to ports 25, 80, 22.

Thanks