How to connect a local computer to the Internet


#1

I’m sorry, my English is not good

I want to connect the local computer to the Internet via vyos.
· Connection image

image01.png
Could you see image01?

Vyos has the following settings.

set interfaces ethernet eth0 address 'x.x.x.x/23' set interfaces ethernet eth0 duplex 'auto' set interfaces ethernet eth0 smp-affinity 'auto' set interfaces ethernet eth0 speed 'auto' set interfaces ethernet eth1 address '10.0.2.7/24' set interfaces ethernet eth1 duplex 'auto' set interfaces ethernet eth1 smp-affinity 'auto' set interfaces ethernet eth1 speed 'auto' set interfaces loopback 'lo' set nat source rule 10 outbound-interface 'eth0' set nat source rule 10 source address '0.0.0.0/0' set nat source rule 10 translation address 'masquerade' set service ssh 'disable-password-authentication' set service ssh port '2222' set system config-management commit-revisions '100' set system console device ttyS0 speed '9600' set system gateway-address 'y.y.y.y' set system host-name 'vyos' set system name-server '157.7.180.133' set system name-server '163.44.76.148' set system ntp server '0.pool.ntp.org' set system ntp server '1.pool.ntp.org' set system ntp server '2.pool.ntp.org' set system syslog global facility all level 'notice' set system syslog global facility protocols level 'debug'

In describing, login user information has been deleted.

Currently, I can not connect from the PC to the Internet.
(Pinging to 8.8.8.8 will result in an error.)

What kind of configuration is not enough for vyos?

[attachment=181][attachment=181]
Since the image was not attached, I attached it.


#2

Hello
set nat source rule 10 source address ‘HEREMUSTBEYOURNET’


#3

Thank you very much for your answer.

set nat source rule 10 outbound-interface 'eth0' set nat source rule 10 source address '10.0.2.0/24' set nat source rule 10 translation address 'masquerade'

I changed it, but it did not connect.
(Pinging to 8.8.8.8 will result in an error.)

“HERE MUST BE YOUR NET”
I’m sorry.
Is this the network between the computer and vyos?


#4

It seems that it was necessary to change the setting of the firewall with the provided API in the specification of the cloud service being used.

Currently, it is now possible to communicate from the PC to the Internet.


#5

please verify the following inputs
interface
gateway
dns server address e.g 8.8.8.8
nat source rule

i think you forgot the gateway for your vyos