This deployment allows the use of a VyOS instance to control access to an Apache instance via VPC inbound routing. With this deployment you can still use the public IP or EIP to access the Apache instance. I also have a single interface version of this available.
You will need access to an AWS account that grants you permissions to be able to make and modify the following;
Below is a list of known issues and limitations with this implementation.
In this deployment a single security group was used. The security group was self referencing and allowed all traffic between members of the security group and a few other ports for management and testing.
Direction | Protocol | Port | Source / Destination |
---|---|---|---|
Inbound | Any | * | Security Group |
Inbound | TCP | 22 | Management IP |
Inbound | TCP | 80 | Management IP |
Inbound | TCP | 443 | Management IP |
Outbound | Any | * | 0.0.0.0/0 |
The following configuration was used for forcing the default route to use eth0.
configure set protocols static route 0.0.0.0/0 next-hop 10.0.0.1 commit save
The following configuration was used for enabling eth1 and eth2 as well as configuring NAT for the private subnet.
configure set interfaces ethernet eth1 address 'dhcp' set interfaces ethernet eth2 address 'dhcp' set nat source rule 100 outbound-interface 'eth0' set nat source rule 100 source address '10.0.2.0/24' set nat source rule 100 translation address 'masquerade' commit save
The following configuration was used for testing that inbound traffic to the Apache server was passing through the VyOS instance.
configure set firewall name filtered default-action 'accept' set firewall name filtered rule 100 action 'drop' set firewall name filtered rule 100 destination address '10.0.1.0/24' set firewall name filtered rule 100 destination port '80' set firewall name filtered rule 100 protocol 'tcp' set firewall name filtered rule 100 source address '50.60.70.80/24' set interfaces ethernet eth0 firewall in name 'filtered' commit save
The route table to look similar to the following;
vyos@ip-10-0-0-53:~$ show ip route Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP, T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP, F - PBR, f - OpenFabric, > - selected route, * - FIB route, q - queued route, r - rejected route S 0.0.0.0/0 [210/0] via 10.0.1.1, eth1, 00:24:43 via 10.0.2.1, eth2, 00:24:43 S>* 0.0.0.0/0 [1/0] via 10.0.0.1, eth0, 00:28:49 C>* 10.0.0.0/24 is directly connected, eth0, 00:28:49 C>* 10.0.1.0/24 is directly connected, eth1, 00:24:43 C>* 10.0.2.0/24 is directly connected, eth2, 00:28:10 vyos@ip-10-0-0-53:~$