networking - How can I add an IP address to iptable or firewall using JAVA? - Ask Ubuntu
i have built monitoring system : shadow-net in java. have web interface shows black listed ips.
now required provide option on web ui allow user block of ip listed. there way block specified ip address i.e. adding iptable or configuring firewall, in java?
blocking ip iptables
enough. getting app system might have security implications. if use system.exec() command have ran root.
here example blocking ip 1.2.3.4 in iptables.
/sbin/iptables -i input -s 1.2.3.4 -j drop
Comments
Post a Comment