Merge pull request #121 from rbrady/add-ext-routing
Add external routing
This commit is contained in:
commit
f979beb899
|
@ -10,6 +10,7 @@ NETWORK={{.}}
|
|||
# Workaround iptables not permitting two -d parameters in one call.
|
||||
iptables -t nat -A BOOTSTACK_MASQ_NEW -s $NETWORK -d 192.168.122.1 -j RETURN
|
||||
iptables -t nat -A BOOTSTACK_MASQ_NEW -s $NETWORK ! -d $NETWORK -j MASQUERADE
|
||||
iptables -t nat -A POSTROUTING -s $NETWORK -o eth0 -j MASQUERADE
|
||||
{{/bootstack.masquerade_networks}}
|
||||
# Link it in.
|
||||
iptables -t nat -I POSTROUTING -j BOOTSTACK_MASQ_NEW
|
||||
|
@ -19,4 +20,6 @@ iptables -t nat -D POSTROUTING -j BOOTSTACK_MASQ || true
|
|||
iptables -t nat -X BOOTSTACK_MASQ || true
|
||||
# Rename the new chain into permanence.
|
||||
iptables -t nat -E BOOTSTACK_MASQ_NEW BOOTSTACK_MASQ
|
||||
# remove forwarding rule (fixes bug 1183099)
|
||||
iptables -D FORWARD -j REJECT --reject-with icmp-host-prohibited
|
||||
|
||||
|
|
Loading…
Reference in New Issue