• 돌아가기
  • 아래로
  • 위로
  • 목록
  • 댓글
Ubuntu

Ubuntu 에서 목적지 별 게이트웨이 라우팅 설정하기.

달소 달소 827

2

2

안녕하세요. 달소입니다.

 

FocalFossa 님께서 Ubuntu 22 network 셋팅과 관련해서 문제점을 말씀해주셔서 덕분에 문제를해결했는데요.

여기서 routes 설정법에 관해서 간단하게 소개해드리고자합니다.

 

기존 Ubuntu 20에서 사용되던 gateway가 사라지면서 routes 쪽으로 통합되었습니다.

Ubuntu 22에서는 gateway4 로 게이트웨이를 사용했지만

image.png.jpg

 

Ubuntu 22의 네트워크 매니저부터는 routes: 에 아래처럼 통합시켜줬습니다.

간단하게 to:는 목적지 via:는 목적지를 가기위한 게이트웨이라고 보면되겠습니다.

 

image.png.jpg

 

위처럼 작성하게되면 기본게이트웨이가 192.168.1.1 이 되게됩니다.

 

이걸 응용해보자면 목적지에따라서 게이트웨이를 수동으로 변경해줄수있습니다.

저같은경우 내부에 Opnsense를 사용하기때문에 목적지를 192.168.1.250 으로도 꺾어줄수있습니다.

 

정상적인 상태에서 naver에 대해 traceroute를 하게되면 아래처럼 기본 게이트웨이로 가게됩니다.

image.png.jpg

 

이 목적지(naver.com)에 대한 routes를 아래처럼 설정해놓고 netplan apply를 하게되면

naver.com으로 가는 모든 통신은 해당 192.168.1.250으로 가게됩니다.

image.png.jpg

 

이걸 응용한다면 내부망과 외부망의 라우팅이 좀더 수월해질것같네요.
지금까지는 라우터에서만 항상했었는데
왜 이걸 지금알았을까요 ㅎㅎ 

신고공유스크랩
2
2명이 추천

댓글 쓰기 권한이 없습니다. 로그인

취소 댓글 등록

cmt alert

신고

"님의 댓글"

이 댓글을 신고하시겠습니까?

댓글 삭제

"님의 댓글"

삭제하시겠습니까?


목록

공유

facebooktwitterpinterestbandkakao story

본 게시판은 서버구축 게시판과 통합되었습니다.

서버구축 게시판 이동하기
분류 제목 글쓴이 날짜 조회 추천
공지 서버OS(ESXi/Linux/Router 등) 게시판 이용안내. 달소 21.11.16.17:43 589 +1
ESXi 공지 ESXi 관련 추천글 모음 5 달소 21.04.23.12:19 3769 +6
ESXi USB LAN으로 ESXi8 설치하기.(Feat. Realtek LAN) 15 달소 23.01.01.18:51 2198 +2
Assistant OS 당신이 알아야할 새로운 스탠다드 Matter란 무엇인가 5 DarkAcid 22.12.30.02:38 744 +1
Proxmox 인텔 igpu는 gvt-g를 이용해 두개 이상의 가상머신에 패스스루 해줄 수 있네요. 13 니즛 22.12.23.02:19 1391 +1
Ubuntu
image
달소 22.12.16.11:00 639 0
Ubuntu
normal
만곰이 22.11.17.13:20 183 0
Ubuntu
image
레노 22.10.01.09:43 1752 +2
Ubuntu
image
달소 22.09.05.17:26 2058 0
Ubuntu
image
달소 22.08.21.15:03 668 0
Ubuntu
image
달소 22.08.01.22:56 8277 +4
Ubuntu
image
달소 22.08.01.22:29 1094 0
Ubuntu
image
고양이 22.07.09.23:24 484 +3
Ubuntu
image
달소 22.06.25.20:23 511 +2
Ubuntu
image
나스초보 22.06.14.17:20 221 0
Ubuntu
normal
섭리 22.06.01.19:30 116 0
Ubuntu
image
달소 22.05.19.13:27 827 +2
Ubuntu
image
달소 22.05.12.12:00 923 +1
Ubuntu
image
달소 22.05.03.15:15 1226 +4
Ubuntu
image
달소 22.05.03.14:51 1672 +3
Ubuntu
image
달소 22.05.03.09:26 1640 0
Ubuntu
image
달소 22.04.28.18:44 611 +1
Ubuntu
image
달소 22.04.28.18:19 288 0
Ubuntu
image
달소 22.04.22.11:46 2318 +3
Ubuntu
image
달소 22.04.22.11:12 203 +3
Ubuntu
normal
서버융 22.04.19.16:57 92 +1
Ubuntu
image
달소 22.04.04.17:28 4794 +3
Ubuntu
image
달소 22.04.01.17:29 5498 +5
Ubuntu
image
달소 22.04.01.15:34 5073 +3
Ubuntu
image
달소 22.04.01.14:58 851 +1
Ubuntu
image
달소 22.04.01.11:35 84 +1
Ubuntu
image
달소 22.03.30.21:30 1030 +1
Ubuntu
normal
syaro 22.03.19.18:15 605 +1
Ubuntu
image
달소 21.12.07.23:47 853 +1
Ubuntu
image
광기의초심자 21.11.20.22:27 271 +1
Ubuntu
image
달소 21.10.09.21:29 177 +1
Ubuntu
image
달소 21.08.05.12:10 155 0
Ubuntu
image
달소 21.07.15.18:26 212 0
Ubuntu
image
달소 21.07.10.21:14 158 0
Ubuntu
image
달소 21.07.10.13:21 144 +1
Ubuntu
image
달소 21.05.11.11:22 285 0
Ubuntu
image
달소 21.04.28.18:00 295 0
Ubuntu
image
달소 21.04.22.17:11 332 +1
Ubuntu
image
달소 21.04.22.14:28 242 0
Ubuntu
image
달소 21.04.22.11:37 741 0
Ubuntu
image
달소 21.04.15.15:09 215 0
Ubuntu
image
달소 21.04.15.04:56 613 +2
Ubuntu
image
달소 21.03.26.16:55 594 +1
Ubuntu
image
달소 21.03.22.23:48 756 0
Ubuntu
image
달소 21.03.22.22:59 619 +1
Ubuntu
image
달소 21.03.19.23:52 38 0
Ubuntu
image
달소 21.03.19.23:31 377 0
Ubuntu
image
달소 21.03.19.18:34 144 0
Ubuntu
image
달소 21.03.17.18:31 216 0
Ubuntu
image
달소 21.03.17.16:50 281 +1
Ubuntu
image
달소 21.02.26.15:02 1576 0
Ubuntu
image
달소 21.01.25.14:19 209 0
Ubuntu
image
달소 21.01.19.22:52 130 +1
Ubuntu
image
달소 21.01.19.14:53 392 0
Ubuntu
image
달소 21.01.15.23:25 257 +1
Ubuntu
image
달소 21.01.15.18:45 295 0
Ubuntu
image
달소 21.01.12.11:51 215 0
Ubuntu
image
달소 21.01.11.18:21 161 +1
Ubuntu
image
달소 21.01.07.16:13 137 0
Ubuntu
image
달소 21.01.06.20:51 311 0
Ubuntu
image
달소 21.01.06.15:18 218 +1
Ubuntu
image
달소 20.12.31.12:30 98 0
Ubuntu
image
달소 20.12.31.12:29 154 0