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

Popular posts from this blog

Windows XP installation, no previous version of Windows NT - Super User

crash - Windows Rundll32 (child process of DllHost) is crashing. How can I even identify it? - Super User

16.04 - Errors were encountered while processing in python - Ask Ubuntu