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/12 20:29] – doug | ubuntu:iptables_rules [2019/05/27 13: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): |
< | < | ||
#!/bin/sh | #!/bin/sh | ||
- | / | + | if [ " |
+ | | ||
+ | fi | ||
</ | </ | ||
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.1407900556.txt.gz · Last modified: 2014/08/12 20:29 by doug