John, I would like to allow access to UDP ports ONLY to certain IP addresses or domains . I am a bit worried to open my box to all and sundries. Is this justified?
To make my life easy, I have combined all ports of interest in your patch, please refer below.
a) How do I modify your codes to allow access to a couple of IP addresses or domains only , i.e. sip03.astrasip.com.au and gw3.austechpartnerships.com - 220.233.127.10
b) How do I modify your codes to enable logging for these events?
pico 90InboundUDP20rtp_udp:
# RTP: UDPPort 10000:20000, AllowHosts: 0.0.0.0/0, DenyHosts:
/sbin/iptables -A $NEW_InboundUDP --proto udp --dport 10000:20000 \
--destination $OUTERNET --src 0.0.0.0/0 --jump ACCEPT
/sbin/iptables -A $NEW_InboundUDP --proto udp --dport 10000:20000 \
--destination $OUTERNET --jump denylog
# IAX2: UDPPort 4569, AllowHosts: 0.0.0.0/0, DenyHosts:
/sbin/iptables -A $NEW_InboundUDP --proto udp --dport 4569 \
--destination $OUTERNET --src 0.0.0.0/0 --jump ACCEPT
/sbin/iptables -A $NEW_InboundUDP --proto udp --dport 4569 \
--destination $OUTERNET --jump denylog
# SIP: UDPPort 5060, AllowHosts: 0.0.0.0/0, DenyHosts:
/sbin/iptables -A $NEW_InboundUDP --proto udp --dport 5060 \
--destination $OUTERNET --src 0.0.0.0/0 --jump ACCEPT
/sbin/iptables -A $NEW_InboundUDP --proto udp --dport 5060 \
--destination $OUTERNET --jump denylog