Verified Commit a96e7898 authored by Wataru Noguchi's avatar Wataru Noguchi ✍🏻
Browse files

[0d4a0667] Add nodes.

parent ec977e93
......@@ -15,8 +15,8 @@ lab:
Cisco: TCP Intercept [PG1X WIKI]
https://pg1x.com/tech:network:cisco:security:network-security:acl:reflexive-acl:reflexive-acl
notes: ''
timestamp: 1599277726.2985404
title: network-security.acl.tcp-intercept.2rt.3sw.3node.1ext-conn.static.ac6665a0
timestamp: 1601107182.7440138
title: network-security.acl.tcp-intercept.2rt.3sw.3node.1ext-conn.static.0d4a0667
version: 0.0.3
nodes:
- id: n0
......@@ -629,88 +629,8 @@ nodes:
slot: 31
label: port31
type: physical
- id: n4
label: trex-0
node_definition: trex
x: -550
y: -200
configuration: |-
# this is a shell script which will be sourced at boot
# if you change the hostname then you need to add a
# /etc/hosts entry as well
# hostname inserthostname_here
# like this:
# echo "127.0.0.1 inserthostname_here" >>/etc/hosts
echo "trex-0" >/etc/hostname
cat <<EOF >/etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet static
hostname trex-0
address 10.1.1.254
netmask 255.255.255.0
#gateway 10.1.1.1
#dns-nameservers 8.8.8.8
EOF
service networking restart
image_definition: alpine-3-10-trex265
tags: []
interfaces:
- id: i0
slot: 0
label: eth0
type: physical
- id: i1
slot: 1
label: eth1
type: physical
- id: n5
label: trex-1
node_definition: trex
x: 100
y: -200
configuration: |-
# this is a shell script which will be sourced at boot
# if you change the hostname then you need to add a
# /etc/hosts entry as well
# hostname inserthostname_here
# like this:
# echo "127.0.0.1 inserthostname_here" >>/etc/hosts
echo "trex-1" >/etc/hostname
cat <<EOF >/etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet static
hostname trex-1
address 198.51.100.252
netmask 255.255.255.0
#gateway 198.51.100.2
#dns-nameservers 8.8.8.8
EOF
service networking restart
image_definition: alpine-3-10-trex265
tags: []
interfaces:
- id: i0
slot: 0
label: eth0
type: physical
- id: i1
slot: 1
label: eth1
type: physical
- id: n6
label: ubuntu-0
label: ubuntu-1
node_definition: ubuntu
x: -550
y: 100
......@@ -718,7 +638,7 @@ nodes:
#cloud-config
password: cisco
chpasswd: { expire: False }
hostname: ubuntu-0
hostname: ubuntu-1
ssh_pwauth: True
ssh_authorized_keys:
- ecdsa-sha2-nistp384 AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzODQAAABhBIbn2VyO9Mby6BwkijQmGfH8O2+Uqewn0/oIOXOxMNgCZiztR3v2o5n1l9ET1GuN7iVMe9whoUiNuZMUVEv0INb+A6Yd0M/37tlWlC+qbIjjqL6UzJAqRISdGP1oVmnV2g== wnoguchi@lasthope.pg1x.net
......@@ -774,7 +694,7 @@ nodes:
label: enp0s3
type: physical
- id: n7
label: ubuntu-1
label: ubuntu-2
node_definition: ubuntu
x: 100
y: 100
......@@ -782,7 +702,7 @@ nodes:
#cloud-config
password: cisco
chpasswd: { expire: False }
hostname: ubuntu-1
hostname: ubuntu-2
ssh_pwauth: True
ssh_authorized_keys:
- ecdsa-sha2-nistp384 AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzODQAAABhBIbn2VyO9Mby6BwkijQmGfH8O2+Uqewn0/oIOXOxMNgCZiztR3v2o5n1l9ET1GuN7iVMe9whoUiNuZMUVEv0INb+A6Yd0M/37tlWlC+qbIjjqL6UzJAqRISdGP1oVmnV2g== wnoguchi@lasthope.pg1x.net
......@@ -807,7 +727,7 @@ nodes:
match:
name: enp0s3
addresses:
- 198.51.100.251/24
- 198.51.100.252/24
routes:
- to: 10.1.1.0/24
via: 198.51.100.2
......@@ -885,6 +805,69 @@ nodes:
slot: 7
label: port7
type: physical
- id: n4
label: ubuntu-0
node_definition: ubuntu
x: -550
y: -200
configuration: |-
#cloud-config
password: cisco
chpasswd: { expire: False }
hostname: ubuntu-0
ssh_pwauth: True
ssh_authorized_keys:
- ecdsa-sha2-nistp384 AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzODQAAABhBIbn2VyO9Mby6BwkijQmGfH8O2+Uqewn0/oIOXOxMNgCZiztR3v2o5n1l9ET1GuN7iVMe9whoUiNuZMUVEv0INb+A6Yd0M/37tlWlC+qbIjjqL6UzJAqRISdGP1oVmnV2g== wnoguchi@lasthope.pg1x.net
package_upgrade: true
packages:
- curl
- vsftpd
- ftp
- iperf3
- nc
- bind-utils
write_files:
- path: /etc/netplan/51-cloud-init_static.yaml
permissions: '0644'
content: |
network:
version: 2
ethernets:
enp0s2:
dhcp4: true
dhcp6: true
match:
name: enp0s2
enp0s3:
match:
name: enp0s3
addresses:
- 10.1.1.254/24
routes:
- to: 198.51.100.0/24
via: 10.1.1.1
metric: 0
- to: 203.0.113.0/24
via: 10.1.1.1
metric: 0
#gateway4: 10.1.1.1
#nameservers:
# addresses:
# - 8.8.8.8
runcmd:
- [ sudo, netplan, generate ]
- [ sudo, netplan, apply ]
image_definition: ubuntu-18-04
tags: []
interfaces:
- id: i0
slot: 0
label: enp0s2
type: physical
- id: i1
slot: 1
label: enp0s3
type: physical
links:
- id: l0
i1: i2
......@@ -906,16 +889,6 @@ links:
n1: n9
i2: i0
n2: n8
- id: l3
i1: i1
n1: n9
i2: i0
n2: n4
- id: l4
i1: i2
n1: n9
i2: i0
n2: n5
- id: l5
i1: i3
n1: n9
......@@ -926,23 +899,23 @@ links:
n1: n9
i2: i0
n2: n7
- id: l8
i1: i1
n1: n4
i2: i0
n2: n2
- id: l9
i1: i1
n1: n6
i2: i1
n2: n2
- id: l10
i1: i1
n1: n5
i2: i0
n2: n3
- id: l11
i1: i1
n1: n7
i2: i1
n2: n3
- id: l3
i1: i0
n1: n4
i2: i1
n2: n9
- id: l4
i1: i1
n1: n4
i2: i0
n2: n2
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment