First of all I would like to say Hi to everyone since I new here.
I would like to configure VyOS as a Virtual Router on VirtualBox or VMWare Player in configuration showed below :
[attachment=145]
And now I would like to set 1to1 DNAT for each VM. I configure VyOS like this :
interfaces {
ethernet eth0 {
address 192.168.109.1/24
description LAN
duplex auto
hw-id 08:00:27:be:63:bc
smp_affinity auto
speed auto
}
ethernet eth1 {
address dhcp
description WAN
duplex auto
hw-id 08:00:27:ca:91:84
smp_affinity auto
speed auto
}
ethernet eth2 {
address dhcp
description EXT1
duplex auto
hw-id 08:00:27:6d:68:4f
smp_affinity auto
speed auto
}
ethernet eth3 {
address dhcp
description EXT2
duplex auto
hw-id 08:00:27:e1:7d:d9
smp_affinity auto
speed auto
}
ethernet eth4 {
address dhcp
description EXT3
duplex auto
hw-id 08:00:27:4e:73:0f
smp_affinity auto
speed auto
}
ethernet eth5 {
address dhcp
description EXT4
duplex auto
hw-id 18:00:27:56:a2:32
smp_affinity auto
speed auto
}
loopback lo {
}
}
nat {
destination {
rule 20 {
inbound-interface eth2
translation {
address 192.168.109.20
}
}
rule 30 {
inbound-interface eth3
translation {
address 192.168.109.21
}
}
rule 40 {
inbound-interface eth4
translation {
address 192.168.109.22
}
}
rule 50 {
inbound-interface eth5
translation {
address 192.168.109.23
}
}
}
source {
rule 1 {
outbound-interface eth1
source {
address 192.168.109.0/24
}
translation {
address masquerade
}
}
rule 20 {
description "EXT1 to VM1"
outbound-interface eth2
source {
address 192.168.109.20
}
translation {
address masquerade
}
}
rule 30 {
description "EXT2 to VM2"
outbound-interface eth3
source {
address 192.168.109.21
}
translation {
address masquerade
}
}
rule 40 {
description "EXT3 to VM3"
outbound-interface eth4
source {
address 192.168.109.22
}
translation {
address masquerade
}
}
rule 50 {
description "EXT4 to VM4"
outbound-interface eth5
source {
address 192.168.109.23
}
translation {
address masquerade
}
}
}
}
service {
dhcp-server {
disabled false
shared-network-name LAN {
authoritative enable
subnet 192.168.109.0/24 {
default-router 192.168.109.1
dns-server 192.168.109.1
dns-server 10.3.3.33
lease 86400
start 192.168.109.100 {
stop 192.168.109.254
}
static-mapping vm1 {
ip-address 192.168.109.20
mac-address 08:00:27:9A:BD:84
}
static-mapping vm2 {
ip-address 192.168.109.21
mac-address 08:00:27:7F:04:3F
}
static-mapping vm3 {
ip-address 192.168.109.22
mac-address 08:00:27:98:28:89
}
static-mapping vm4 {
ip-address 192.168.109.23
mac-address 08:00:27:D5:BC:FE
}
}
}
}
dns {
forwarding {
cache-size 0
listen-on eth0
name-server 10.3.3.33
}
}
ssh {
port 22
}
}
system {
config-management {
commit-revisions 20
}
console {
device ttyS0 {
speed 9600
}
}
host-name vyos
login {
user vyos {
authentication {
encrypted-password $1$HR42KG7n$Ynpv5D8LEnJiOZPX85Wt.1
plaintext-password ""
}
level admin
}
}
ntp {
server 0.pool.ntp.org {
}
server 1.pool.ntp.org {
}
server 2.pool.ntp.org {
}
}
package {
auto-sync 1
repository community {
components main
distribution helium
password ""
url http://packages.vyos.net/vyos
username ""
}
}
syslog {
global {
facility all {
level notice
}
facility protocols {
level debug
}
}
}
time-zone UTC
}
the problem is that I can reach only one external interface of my router from Workstations and Server which is strange.
I take care of MAC addresses to be different, my VyOS Router gets addresses from DHCP and everything looks fine in configuration.
I found that the Workstation can’t find other external interfaces of my VyOS in ARP when I add it manually ping and other services works.
I tried on both VirtualBox and VMWare and even on different VM Servers the result was the same every time.
I also found out that even without any nat configuration I can reach only one external interface.
After several tries I tried to run Live Fedora to check if I will be able to reach any of external interfaces connected to VM and after fedora got 5 external addresses from DHCP I was able to reach all of them from Workstation machine.
After that try I reboot VM with VyOS and result was as before only one interface respond ;/
I can ping Workstations through every external interface (ping 10.3.53.150 -i ethX) but in other hand I can ping only one VyOS external interface from Workstation (typically this interface who got the address from dhcp first)
May by I missed something in my configuration. I can’t get it works well it look like VyOS register only one external interface.
To repeat most basic example just create VM with VyOS atach to it more then one bridged interface configure it as external and got adress from dhcp and try to ping from other machine in your physical network.