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

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User

sql server - "Configuration file does not exist", Event ID 274 - Super User