Hey there
I’ve got a router with a working NAT setup (172.16.0.x range) which forwards ports correctly, and users are able to SSH into the VM.
Outbound traffic works too as all traffic goes via eth1 (static IP). So far so good.
The requirement: I want to route outbound traffic for some of the VM’s out through another interface - eth4 (FYI this is a DHCP interface)
My current setup:
NAT-ROUTER# show nat source
rule 50 {
outbound-interface eth4
protocol tcp
source {
address 172.16.0.20/32 // I want to route outbound traffic from this host through eth4
}
translation {
address masquerade
}
}
rule 100 {
outbound-interface eth1
protocol all
source {
address 172.16.0.0/24 // All other hosts outbound traffic should go via eth1 (this works fine already)
}
translation {
address masquerade
}
}
Policy table:
NAT-ROUTER# show policy
route eth1 {
rule 3 {
description "New rule - setup to route outbound traffic from eth4"
destination {
address 0.0.0.0/0
}
protocol all
set {
table 103
}
source {
address 172.16.0.20/32
}
}
rule 10 {
destination {
address 0.0.0.0/0
}
protocol all
set {
table 102
}
source {
address 172.16.0.0/24
}
}
}
And finally show protocols
NAT-ROUTER# show protocols
static {
route 0.0.0.0/0 {
next-hop **HIDDEN - This is the eth1 gateway** {
}
}
table 101 {
interface-route 0.0.0.0/0 {
next-hop-interface eth3 {
}
}
}
table 102 {
route 0.0.0.0/0 {
next-hop **HIDDEN - This is the eth1 gateway** {
}
}
}
table 103 {
interface-route 0.0.0.0/0 {
next-hop-interface eth4 { //eth4 is a DHCP interface
}
}
}
}
The problem:
Outbound traffic for 172.16.0.20 continues to be from eth1, instead of eth4.
Any ideas?
Thanks in advance