22 lines
641 B
YAML
22 lines
641 B
YAML
######################################
|
|
# Configuration NAT-Server #
|
|
######################################
|
|
---
|
|
- name: Copy Public ssh-key and paste to NAT-Server
|
|
copy:
|
|
src: /tmp/id_rsa.pub
|
|
dest: ~/.ssh/
|
|
|
|
- name: Change Permission of the Private ssh-key only to read for the User
|
|
raw: "chmod 0400 ~/.ssh/id_rsa"
|
|
|
|
- name: Edit Network interface file on NAT-Server
|
|
blockinfile:
|
|
path: /etc/network/interfaces
|
|
block: |
|
|
auto enp7s0
|
|
iface enp7s0 inet dhcp
|
|
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
|
|
post-up iptables -t nat -A POSTROUTING -s '10.0.0.0/16' -o enp7s0 -j MASQUERADE
|
|
|