Vyos 간단 라우팅 설정
2023. 11. 22. 04:04ㆍ스크랩
728x90
반응형
Vyos에 VMnet8(NAT) / VMnet2(host-only) 2개카드를 붙여서 10.0.1.0/24 폐쇄된 네트워크들이 인터넷이 되게 라우팅해주는 구성 연습.
내부는 Vmet2네트워크 사용 / 네트워크 대역대 10.0.1.0/24
#구성 모드로 진입
configure
#내부 IP 주소를 외부 IP 주소로 변환하기 위한 인터페이스 eth0
set nat source rule 100 outbound-interface eth0
#외부 IP 주소로 변환
set nat source rule 100 translation address masquerade
#변경 사항을 구성 파일에 적용
commit
#변경 사항 저장
save
#구성 모드 나가기
exit
#외부로 IP 설정
configure
#내부 IP 주소를 외부 IP 주소로 변환하기 위한 인터페이스 eth0
set nat source rule 100 outbound-interface eth0
#외부 IP 주소로 변환
set nat source rule 100 translation address masquerade
commit
save
exit
#IP 주소할당
configure
set interfaces ethernet eth0 address 192.168.163.253/24
set interfaces ethernet eth1 address 10.0.1.254/24
commit
save
exit
# Specify static route into the routing table sending all non local traffic to the nexthop address <address>.
set protocols static route 0.0.0.0/0 next-hop <address>
# Delete default route from the system.
delete protocols static route 0.0.0.0/0
https://docs.vyos.io/en/equuleus/configuration/system/default-route.html#cfgcmd-set-protocols-static-route-0-0-0-0-0-next-hop-address
VM들의 네트워크 설정
VM1
VM2
Vyos
ping Test
https://www.youtube.com/watch?v=etUnogxCh8U
반응형
'스크랩' 카테고리의 다른 글
SOAP/RESTful (0) | 2023.08.05 |
---|---|
모놀리시식 VS 마이크로서비스 (0) | 2023.08.05 |
AWS S3 (0) | 2023.07.08 |
쿠버네티스관련기사 (0) | 2023.06.28 |
비전공자 개발자 취업, 어떻게 준비해야 할까? (0) | 2023.05.13 |