1. ACLs on routers
1.1. Intro
Routers are able to filter the network traffic. This is a short demonstration of how that works.
We'll be using a debian machine for generating the traffic and another for answering the services.
Last run
2020-07-31
Verified: 2018-04-27.
Upgraded 2020-02-01; added line for unpredictable network adapter names in start-up scripts.
Verified: 2018-04-27.
Upgraded 2020-02-01; added line for unpredictable network adapter names in start-up scripts.
1.2. The network
We use a simple network, static routing, nothing special.

The
Vagrantfile
contains:
# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.define :xenial1 do |t| t.vm.box = "ubuntu/xenial64" t.vm.box_url = "file:////links/virt_comp/vagrant/boxes/xenial64.box" t.vm.provider "virtualbox" do |prov| prov.customize ["modifyvm", :id, "--nic2", "hostonly", "--hostonlyadapter2", "vboxnet1" ] end t.vm.provision "shell", path: "./setup.xenial1.sh" end config.vm.define :xenial2 do |t| t.vm.box = "ubuntu/xenial64" t.vm.box_url = "file:////links/virt_comp/vagrant/boxes/xenial64.box" t.vm.provider "virtualbox" do |prov| prov.customize ["modifyvm", :id, "--nic2", "hostonly", "--hostonlyadapter2", "vboxnet2" ] end t.vm.provision "shell", path: "./setup.xenial2.sh" end config.vm.define :xenial3 do |t| t.vm.box = "ubuntu/xenial64" t.vm.box_url = "file:////links/virt_comp/vagrant/boxes/xenial64.box" t.vm.provider "virtualbox" do |prov| prov.customize ["modifyvm", :id, "--nic2", "hostonly", "--hostonlyadapter2", "vboxnet3" ] end t.vm.provision "shell", path: "./setup.xenial3.sh" end config.vm.define :xenial4 do |t| t.vm.box = "ubuntu/xenial64" t.vm.box_url = "file:////links/virt_comp/vagrant/boxes/xenial64.box" t.vm.provider "virtualbox" do |prov| prov.customize ["modifyvm", :id, "--nic2", "hostonly", "--hostonlyadapter2", "vboxnet4" ] end t.vm.provision "shell", path: "./setup.xenial4.sh" end end
and the initial router-settings are:
ip routing interface FastEthernet0/0 ip address 10.128.1.1 255.255.255.0 no shutdown interface FastEthernet0/1 ip address 10.128.2.1 255.255.255.0 shutdown no shutdown
The setup.xenial files contain the initial IP configuration.
setup.xenial1.sh:
ETH1=$(dmesg | grep -i 'renamed from eth1' | sed -n 's/: renamed from eth1//;s/.* //p') ifconfig $ETH1 10.128.1.101 netmask 255.255.255.0 up route add -net 10.128.0.0 netmask 255.255.0.0 gw 10.128.1.1
setup.xenial2.sh:
ETH1=$(dmesg | grep -i 'renamed from eth1' | sed -n 's/: renamed from eth1//;s/.* //p') ifconfig $ETH1 10.128.2.100 netmask 255.255.255.0 up route add -net 10.128.0.0 netmask 255.255.0.0 gw 10.128.2.1
setup.xenial3.sh:
ETH1=$(dmesg | grep -i 'renamed from eth1' | sed -n 's/: renamed from eth1//;s/.* //p') ifconfig $ETH1 10.128.1.101 netmask 255.255.255.0 up route add -net 10.128.0.0 netmask 255.255.0.0 gw 10.128.1.1
setup.xenial4.sh: