Gns 3 connecting to kali client

Hi, so i am curently trying to give my kali linux and lubuntu machines internet within my gns3 virtual environment. I have the 2 clients connected to a hub, which is then connected to the VYOS router, which is then connected to the NAT node. i have configured the router and declared my eth0 address as DHCP. I’ve also configured it to set the internal address to my router address(192.168.1.254/24). I am successfully able to ping the internet within my router, but that connection does not translate over to the kali and lubuntu clients. i have configured the wired internet connection on both machines to the corresponding IP addresses but no luck.is there a step I am missing?

So, this is the diagram?

[PC_01] ------->  |         |
                  | switch  |  ---> VyOS Router -----> Nat router ---> Internet
[PC_02] ------->  |         |

Can you provide configuration?

this is the diagram here. sorry I am new to this world, how do i provide config?

Oh, all in gns3! In that case:

# Get IP addres from your NAT netowrk.
# I see no interface on the diagram, so I'll suppose:
# eth0 connected to NAT 
# eth1 connected to switch.

set interface ethernet eth0 address dhcp
set nat source rule 10 outbound-interface eth0
set nat source rule 10 translation address masquerade

set interface ethernet eth1 address 192.168.1.254/24

You can find relevant information and guidance on our docs:

Getting configuration:

show config
show config commands

Your host should be set up using ip 192.168.1.254 as the default gateway

1 Like

Yes! now i am able to ping to 8.8.8.8 on my kali client but am not able to ping to www.google.com.
would you happen to know what the issue would be on here?

Did you configure “system name-server ”?

What about a dhcp server?

Hello @elico
Configuration dhcp-server:

set service dhcp-server shared-network-name LAN subnet 192.168.1.0/24 default-router '192.168.1.254'
set service dhcp-server shared-network-name LAN subnet 192.168.1.0/24 range 1 start '192.168.1.10'
set service dhcp-server shared-network-name LAN subnet 192.168.1.0/24 range 1 stop '192.168.1.100'
set service dhcp-server shared-network-name LAN subnet 192.168.1.0/24 name-server '8.8.8.8'
1 Like