88 | | If you ran the above command, it would immediately add a rule to the iptables |
| 88 | If you ran the above command, it would immediately add a rule to the iptables INPUT chain. If you ran iptalbes -L, you'd see your new rule in the list. |
| 89 | |
| 90 | Although the above looks complicated, it should be noted that the only parts you should ever be changing are the -s, -d and --dport options. If you feel the need to change anything else, you should ask your fellow Evergreen Admins about it first! |
| 91 | |
| 92 | Once you've edited the rules to your liking, you need to save them to a file. You do this with the following command: |
| 93 | {{{ |
| 94 | sudo iptables-save > /<path>/<firewall_file> |
| 95 | }}} |
| 96 | |
| 97 | This will save your changes to the file listed on the right. |
| 98 | |
| 99 | === Editing the file === |
| 100 | |
| 101 | We keep our iptables rules in a configuration file. For the name and location, ask your fellow Evergreen admins. When you open the file, it simply looks like a list of iptable commands, just like the ones you'd type at the command line. You can open the file with: |
| 102 | {{{ |
| 103 | sudo vim firewall_file |
| 104 | }}} |
| 105 | |
| 106 | Once opened, you can just add a line to the file and save it. It's important to remember that the |
| 107 | |
| 108 | |