I'm confused.
Are you trying to control iptables using the web service?
Or are you trying to control iptables using ssh?
Or are you asking for the ssh command to modify the server's iptables?
Or are you asking how to use the web service to block/ublock a port (like the ssh port)?
It seems to me that you are asking how to send an iptables command to the server using ssh.
Since the iptables command requires 'sudo', the easiest way is to login. Since you seem to care a lot about security, best to use ssh keys instead of passwords, and to not permit root logins.
Code:
client:~$ ssh my_user@server_addr
server:~$ sudo iptables -L
[...lots of output...]
server:~$ exit
client:~$
Is that what you are looking for?
Bookmarks