Skip to content

Commit

Permalink
provisioner setup changes to enable NAT for workers (tinkerbell#33)
Browse files Browse the repository at this point in the history
## Description

Provisioner NAT setup for workers 

## Why is this needed

internet access on workers 
tinkerbell#31 


Fixes: #

## How Has This Been Tested?

- workflow executed successfully.
- ping from workers works correctly.

PR in reference with tinkerbell/tink#410
  • Loading branch information
mergify[bot] authored Jan 7, 2021
2 parents 0cb5e79 + 7acaae6 commit b504810
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,12 @@ whats_next() (
echo "$BLANK Follow the steps described in https://tinkerbell.org/examples/hello-world/ to say 'Hello World!' with a workflow."
)

setup_nat() (
iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
iptables -A FORWARD -i eth0 -o eth1 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
)

do_setup() (
# perform some very rudimentary platform detection
lsb_dist=$(get_distribution)
Expand All @@ -504,7 +510,7 @@ do_setup() (
source "$ENV_FILE"

setup_networking "$lsb_dist" "$lsb_version"

setup_nat
setup_osie
generate_certificates
setup_docker_registry
Expand Down

0 comments on commit b504810

Please sign in to comment.