ubuntu:iptables_rules
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| ubuntu:iptables_rules [2014/08/13 03:26] – doug | ubuntu:iptables_rules [2019/05/27 20:31] (current) – doug | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| Here's how I set up a firewall on a server. This is confirmed to work in Ubuntu 10.04, 12.04, and 14.04. | Here's how I set up a firewall on a server. This is confirmed to work in Ubuntu 10.04, 12.04, and 14.04. | ||
| - | First of all, '' | + | First of all, '' |
| Let's create some rules, starting with this template: | Let's create some rules, starting with this template: | ||
| Line 39: | Line 39: | ||
| '' | '' | ||
| - | Put the following into it: | + | Put the following into it (replace eth0 with the name of your network interface): |
| - | <code> | + | <file> |
| #!/bin/sh | #!/bin/sh | ||
| - | / | + | if [ " |
| - | </code> | + | |
| + | fi | ||
| + | </file> | ||
| Make it executable: | Make it executable: | ||
| Line 51: | Line 53: | ||
| That should do the trick! Confirm that your firewall rules come up correctly on boot. | That should do the trick! Confirm that your firewall rules come up correctly on boot. | ||
| + | |||
ubuntu/iptables_rules.1407900379.txt.gz · Last modified: by doug
