| 185 | | Can you guess the issue? hope you will. |
| 186 | | |
| 187 | | |
| 188 | | |
| 189 | | '''3. Deleting a rule from the iptable :''' |
| | 185 | Can you guess the issue? hope you will.This is due to rules are executed from top to bottom. Enter following command to see the rules order(Numbers). |
| | 186 | {{{ |
| | 187 | sudo iptables -L --line-numbers |
| | 188 | }}} |
| | 189 | |
| | 190 | [[Image(image4.png)]] |
| | 191 | |
| | 192 | You have 2 fixes to resolve this, Either add SSH Rule to Top Or Deleting DROP All rule. Replace '''-A''' |
| | 193 | with '''-I'''. Now check the IP tables. |
| | 194 | |
| | 195 | [[Image(image5.png)]] |
| | 196 | |
| | 197 | '''3. Add a rule to TOP of the iptable :''' |
| | 198 | {{{ |
| | 199 | sudo iptables -I INPUT -s 192.168.1.4 -p tcp --dport 22 -j ACCEPT |
| | 200 | }}} |
| | 201 | |
| | 202 | |
| | 203 | |
| | 204 | '''4. Deleting a rule from the iptable :''' |