Page MenuHomeDevCentral

Systemd units to create for Dwellers

Authored By
dereckson
Jul 9 2015, 16:05
Size
2 KB
Referenced Files
None
Subscribers
None

Systemd units to create for Dwellers

[ Stuff to run on Dwellers at boot time, to split in 3 systemd units ]
#
# Network
#
# IPv4 through Online
ifup ens192
ip addr 212.129.32.223/32 dev ens192
ip route add 62.210.76.1 dev ens192
ip route add default via 62.210.76.1
# IPv6 tunnel through Hurricane Electric
ip tunnel add he-ipv6 mode sit remote 216.66.84.42 local 212.129.32.223 ttl 255
ip link set he-ipv6 up
ip addr add 2001:470:1f12:ce7::2/64 dev he-ipv6
ip addr add 2001:470:1f13:ce7:ca5:cade:fab:1e/64 dev he-ipv6
ip route change ::/0 dev he-ipv6
#
# Mailserver
#
lxc-start -n mailserver -d
iptables -t nat -I PREROUTING -i ens192 -p TCP -d 212.129.32.223/32 --dport 25 -j DNAT --to-destination 10.0.3.8:25
iptables -t nat -I PREROUTING -i ens192 -p TCP -d 212.129.32.223/32 --dport 21080 -j DNAT --to-destination 10.0.3.8:80
iptables -t nat -I PREROUTING -i ens192 -p TCP -d 212.129.32.223/32 --dport 110 -j DNAT --to-destination 10.0.3.8:110
iptables -t nat -I PREROUTING -i ens192 -p TCP -d 212.129.32.223/32 --dport 143 -j DNAT --to-destination 10.0.3.8:143
iptables -t nat -I PREROUTING -i ens192 -p TCP -d 212.129.32.223/32 --dport 465 -j DNAT --to-destination 10.0.3.8:465
iptables -t nat -I PREROUTING -i ens192 -p TCP -d 212.129.32.223/32 --dport 587 -j DNAT --to-destination 10.0.3.8:587
iptables -t nat -I PREROUTING -i ens192 -p TCP -d 212.129.32.223/32 --dport 993 -j DNAT --to-destination 10.0.3.8:993
iptables -t nat -I PREROUTING -i ens192 -p TCP -d 212.129.32.223/32 --dport 995 -j DNAT --to-destination 10.0.3.8:995
iptables -t nat -I PREROUTING -i docker0 -p TCP -d 212.129.32.223/32 --dport 25 -j DNAT --to-destination 10.0.3.8:25
iptables -t nat -I PREROUTING -i docker0 -p TCP -d 212.129.32.223/32 --dport 143 -j DNAT --to-destination 10.0.3.8:143
iptables -t nat -I PREROUTING -i docker0 -p TCP -d 212.129.32.223/32 --dport 465 -j DNAT --to-destination 10.0.3.8:465
iptables -t nat -I PREROUTING -i docker0 -p TCP -d 212.129.32.223/32 --dport 587 -j DNAT --to-destination 10.0.3.8:587
#
# Docker
#
docker start acquisitariat devcentral wolfphab etherpad otrs_demo

File Metadata

Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4030
Default Alt Text
Systemd units to create for Dwellers (2 KB)

Event Timeline