NAT rule doesn't work

Hello, my SNAT rule won’t work. When I try to ping 8.8.8.8 from eth1 Interface the ping shows ,Host unreachable". On the eth0 Site is my internal home network connected, pings from eth0 to google dns server work. Can anyone help me please?

vyos@vyos# sh
interfaces {
ethernet eth0 {
address dhcp
duplex auto
hw-id 50:00:00:06:00:00
smp-affinity auto
speed auto
}
ethernet eth1 {
address 23.1.2.1/24
duplex auto
hw-id 50:00:00:06:00:01
smp-affinity auto
speed auto
}
ethernet eth2 {
duplex auto
hw-id 50:00:00:06:00:02
smp-affinity auto
speed auto
}
ethernet eth3 {
duplex auto
hw-id 50:00:00:06:00:03
smp-affinity auto
speed auto
}
loopback lo {
}
}
nat {
source {
rule 100 {
outbound-interface eth0
source {
address 23.1.2.0/24
}
translation {
address masquerade
}
}
}
}
system {
config-management {
commit-revisions 100
:

ping 8.8.8.8 source-address 23.1.2.1

this command isn’t supported I have the Vyos Crux OS 1.2.9

So it should be interface
ping 8.8.8.8 interface 23.1.2.1

run ping … works! thank’s a lot. But why the other command with the specified interface isn’t working?

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.