Downtown Doug Brown Wiki

Thoughts from a combined Apple/Linux/Windows geek

User Tools

Site Tools


ubuntu:iptables_rules

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
ubuntu:iptables_rules [2014/12/25 19:05] dougubuntu:iptables_rules [2019/05/27 13:31] (current) doug
Line 39: Line 39:
 ''sudo vi /etc/network/if-pre-up.d/iptables'' ''sudo vi /etc/network/if-pre-up.d/iptables''
  
-Put the following into it:+Put the following into it (replace eth0 with the name of your network interface):
  
 <file> <file>
 #!/bin/sh #!/bin/sh
-/sbin/iptables-restore </etc/iptables.rules+if [ "${IFACE}" = eth0 ]; then 
 +    /sbin/iptables-restore < /etc/iptables.rules 
 +fi
 </file> </file>
  
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.1419563110.txt.gz · Last modified: 2014/12/25 19:05 by doug