I want only one remote machine to be able to access a server, so I've run the following commands on the server so that only a machine with the IP address 188.8.131.52 can connect to it in any way:
iptables -N LOGDROP
iptables -A LOGDROP -j LOG -m limit --limit 5/min
iptables -A LOGDROP -j DROP
iptables -A INPUT -s 184.108.40.206 -j ACCEPT
iptables -A INPUT -j LOGDROP
iptables -A OUTPUT -j ACCEPT
However, this is causing it to take ages for me to connect to it from SSH. But then finally when it does connect, I can execute commands through SSH at the expected speed and responsiveness through. So I'm doing something wrong when setting up the iptables rules to make things go very slowly upon connecting. If you have any suggestions of how to fix this or can see my error, please let me know. Thanks.