Skip to content
Snippets Groups Projects
Commit 0ce8c55d authored by Sebastian Rieger's avatar Sebastian Rieger
Browse files

added default route to servers

parent 19954abe
Branches
No related tags found
No related merge requests found
...@@ -527,122 +527,124 @@ end ...@@ -527,122 +527,124 @@ end
</node> </node>
<node name="server-1" type="SIMPLE" subtype="server" location="251,336"> <node name="server-1" type="SIMPLE" subtype="server" location="251,336">
<extensions> <extensions>
<entry key="config" type="String">#cloud-config <entry key="config" type="String">#cloud-config&#xD;
bootcmd: bootcmd:&#xD;
- ln -s -t /etc/rc.d /etc/rc.local - ln -s -t /etc/rc.d /etc/rc.local&#xD;
hostname: server-1 hostname: server-1&#xD;
manage_etc_hosts: true manage_etc_hosts: true&#xD;
runcmd: runcmd:&#xD;
- start ttyS0 - start ttyS0&#xD;
- systemctl start getty@ttyS0.service - systemctl start getty@ttyS0.service&#xD;
- systemctl start rc-local - systemctl start rc-local&#xD;
- sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config - sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config&#xD;
- echo "UseDNS no" &gt;&gt; /etc/ssh/sshd_config - echo "UseDNS no" &gt;&gt; /etc/ssh/sshd_config&#xD;
- service ssh restart - service ssh restart&#xD;
- service sshd restart - service sshd restart&#xD;
users: users:&#xD;
- default - default&#xD;
- gecos: User configured by VIRL Configuration Engine 0.18.9 - gecos: User configured by VIRL Configuration Engine 0.18.9&#xD;
lock-passwd: false lock-passwd: false&#xD;
name: cisco name: cisco&#xD;
plain-text-passwd: cisco plain-text-passwd: cisco&#xD;
shell: /bin/bash shell: /bin/bash&#xD;
ssh-authorized-keys: ssh-authorized-keys:&#xD;
- VIRL-USER-SSH-PUBLIC-KEY - VIRL-USER-SSH-PUBLIC-KEY&#xD;
sudo: ALL=(ALL) ALL sudo: ALL=(ALL) ALL&#xD;
write_files: write_files:&#xD;
- path: /etc/init/ttyS0.conf - path: /etc/init/ttyS0.conf&#xD;
owner: root:root owner: root:root&#xD;
content: | content: |&#xD;
# ttyS0 - getty # ttyS0 - getty&#xD;
# This service maintains a getty on ttyS0 from the point the system is # This service maintains a getty on ttyS0 from the point the system is&#xD;
# started until it is shut down again. # started until it is shut down again.&#xD;
start on stopped rc or RUNLEVEL=[12345] start on stopped rc or RUNLEVEL=[12345]&#xD;
stop on runlevel [!12345] stop on runlevel [!12345]&#xD;
respawn respawn&#xD;
exec /sbin/getty -L 115200 ttyS0 vt102 exec /sbin/getty -L 115200 ttyS0 vt102&#xD;
permissions: '0644' permissions: '0644'&#xD;
- path: /etc/systemd/system/dhclient@.service - path: /etc/systemd/system/dhclient@.service&#xD;
content: | content: |&#xD;
[Unit] [Unit]&#xD;
Description=Run dhclient on %i interface Description=Run dhclient on %i interface&#xD;
After=network.target After=network.target&#xD;
[Service] [Service]&#xD;
Type=oneshot Type=oneshot&#xD;
ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease&#xD;
RemainAfterExit=yes RemainAfterExit=yes&#xD;
owner: root:root owner: root:root&#xD;
permissions: '0644' permissions: '0644'&#xD;
- path: /etc/rc.local - path: /etc/rc.local&#xD;
owner: root:root owner: root:root&#xD;
permissions: '0755' permissions: '0755'&#xD;
content: |- content: |-&#xD;
#!/bin/sh -e #!/bin/sh -e&#xD;
ifconfig eth1 up 10.0.0.2 netmask 255.255.0.0 ifconfig eth1 up 10.0.0.2 netmask 255.255.0.0&#xD;
route add -host 192.168.0.1 gw 10.0.0.1 dev eth1 route add -host 192.168.0.1 gw 10.0.0.1 dev eth1&#xD;
route add -net 10.0.0.0/16 gw 10.0.0.1 dev eth1 route add -net 10.0.0.0/16 gw 10.0.0.1 dev eth1&#xD;
exit 0 route add default gw 10.0.0.1&#xD;
exit 0&#xD;
</entry> </entry>
</extensions> </extensions>
<interface id="0" name="eth1" ipv4="10.0.0.2" netPrefixLenV4="16"/> <interface id="0" name="eth1" ipv4="10.0.0.2" netPrefixLenV4="16"/>
</node> </node>
<node name="server-2" type="SIMPLE" subtype="server" location="517,336"> <node name="server-2" type="SIMPLE" subtype="server" location="517,336">
<extensions> <extensions>
<entry key="config" type="String">#cloud-config <entry key="config" type="String">#cloud-config&#xD;
bootcmd: bootcmd:&#xD;
- ln -s -t /etc/rc.d /etc/rc.local - ln -s -t /etc/rc.d /etc/rc.local&#xD;
hostname: server-2 hostname: server-2&#xD;
manage_etc_hosts: true manage_etc_hosts: true&#xD;
runcmd: runcmd:&#xD;
- start ttyS0 - start ttyS0&#xD;
- systemctl start getty@ttyS0.service - systemctl start getty@ttyS0.service&#xD;
- systemctl start rc-local - systemctl start rc-local&#xD;
- sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config - sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config&#xD;
- echo "UseDNS no" &gt;&gt; /etc/ssh/sshd_config - echo "UseDNS no" &gt;&gt; /etc/ssh/sshd_config&#xD;
- service ssh restart - service ssh restart&#xD;
- service sshd restart - service sshd restart&#xD;
users: users:&#xD;
- default - default&#xD;
- gecos: User configured by VIRL Configuration Engine 0.18.9 - gecos: User configured by VIRL Configuration Engine 0.18.9&#xD;
lock-passwd: false lock-passwd: false&#xD;
name: cisco name: cisco&#xD;
plain-text-passwd: cisco plain-text-passwd: cisco&#xD;
shell: /bin/bash shell: /bin/bash&#xD;
ssh-authorized-keys: ssh-authorized-keys:&#xD;
- VIRL-USER-SSH-PUBLIC-KEY - VIRL-USER-SSH-PUBLIC-KEY&#xD;
sudo: ALL=(ALL) ALL sudo: ALL=(ALL) ALL&#xD;
write_files: write_files:&#xD;
- path: /etc/init/ttyS0.conf - path: /etc/init/ttyS0.conf&#xD;
owner: root:root owner: root:root&#xD;
content: | content: |&#xD;
# ttyS0 - getty # ttyS0 - getty&#xD;
# This service maintains a getty on ttyS0 from the point the system is # This service maintains a getty on ttyS0 from the point the system is&#xD;
# started until it is shut down again. # started until it is shut down again.&#xD;
start on stopped rc or RUNLEVEL=[12345] start on stopped rc or RUNLEVEL=[12345]&#xD;
stop on runlevel [!12345] stop on runlevel [!12345]&#xD;
respawn respawn&#xD;
exec /sbin/getty -L 115200 ttyS0 vt102 exec /sbin/getty -L 115200 ttyS0 vt102&#xD;
permissions: '0644' permissions: '0644'&#xD;
- path: /etc/systemd/system/dhclient@.service - path: /etc/systemd/system/dhclient@.service&#xD;
content: | content: |&#xD;
[Unit] [Unit]&#xD;
Description=Run dhclient on %i interface Description=Run dhclient on %i interface&#xD;
After=network.target After=network.target&#xD;
[Service] [Service]&#xD;
Type=oneshot Type=oneshot&#xD;
ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease&#xD;
RemainAfterExit=yes RemainAfterExit=yes&#xD;
owner: root:root owner: root:root&#xD;
permissions: '0644' permissions: '0644'&#xD;
- path: /etc/rc.local - path: /etc/rc.local&#xD;
owner: root:root owner: root:root&#xD;
permissions: '0755' permissions: '0755'&#xD;
content: |- content: |-&#xD;
#!/bin/sh -e #!/bin/sh -e&#xD;
ifconfig eth1 up 10.0.0.3 netmask 255.255.0.0 ifconfig eth1 up 10.0.0.3 netmask 255.255.0.0&#xD;
route add -host 192.168.0.1 gw 10.0.0.1 dev eth1 route add -host 192.168.0.1 gw 10.0.0.1 dev eth1&#xD;
route add -net 10.0.0.0/16 gw 10.0.0.1 dev eth1 route add -net 10.0.0.0/16 gw 10.0.0.1 dev eth1&#xD;
exit 0 route add default gw 10.0.0.1&#xD;
exit 0&#xD;
</entry> </entry>
</extensions> </extensions>
<interface id="0" name="eth1" ipv4="10.0.0.3" netPrefixLenV4="16"/> <interface id="0" name="eth1" ipv4="10.0.0.3" netPrefixLenV4="16"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment