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

debian - Kali Linux - Debootstrap error Failed to determine codename for the release - Super User

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

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