Ufw: Difference between revisions

From ICO wiki
Jump to navigationJump to search
Smannart (talk | contribs)
Created page with 'Siim Männart A32'
 
Mernits (talk | contribs)
No edit summary
Line 1: Line 1:
Siim Männart A32
<source lang="bash">
sudo ufw enable
sudo ufw allow 22
</source>
/etc/default/ufw
<source lang="bash">
DEFAULT_FORWARD_POLICY="ACCEPT"
</source>
 
/etc/ufw/sysctl.conf
<source lang="bash">
net.ipv4.ip_forward=1
net.ipv6.conf.default.forwarding=1
</source>
 
/etc/ufw/before.rules
<source lang="bash">
# nat Table rules
*nat
:POSTROUTING ACCEPT [0:0]
 
# Forward traffic from eth1 through eth0.
-A POSTROUTING -s 192.168.0.0/24 -o eth0 -j MASQUERADE
 
# don't delete the 'COMMIT' line or these nat table rules won't be processed
COMMIT
</source>
 
<source lang="bash">
sudo ufw disable && sudo ufw enable
</source>

Revision as of 21:26, 16 February 2011

sudo ufw enable
sudo ufw allow 22

/etc/default/ufw

DEFAULT_FORWARD_POLICY="ACCEPT"

/etc/ufw/sysctl.conf

net.ipv4.ip_forward=1
net.ipv6.conf.default.forwarding=1

/etc/ufw/before.rules

# nat Table rules
*nat
:POSTROUTING ACCEPT [0:0]

# Forward traffic from eth1 through eth0.
-A POSTROUTING -s 192.168.0.0/24 -o eth0 -j MASQUERADE

# don't delete the 'COMMIT' line or these nat table rules won't be processed
COMMIT
sudo ufw disable && sudo ufw enable