라우팅 테이블 설정.

i_wish_awk_sed_perl의 이미지

현재 다음과 같이 되어 있습니다.

리눅스(A) 와 리눅스(B) 그리고 리눅스(C) 이렇게 3개가 존재합니다. 각각은 다음과 같은 이더넷카드를 가지고 있습니다.

리눅스(A):
eth0: 192.168.1.1
eth1: 공인아이피
eth2: 192.168.2.1

리눅스(B):
eth0: 192.168.1.2

리눅스(C)
eth0: 192.168.2.2

입니다. 리눅스(A)는 인터넷(공인아이피를 이용해서)이 되지만 다른 녀석들은 인터넷이 되지 않습니다. iptables 와 같은 명령어를 이용하지 않고 단순히 route 테이블을 조작하는 방법에 의해 작업하고 싶은데...제가 네트워크 기초가 부족해서 인지 제대로 되지 않고 있습니다.

리눅스(A)의 route 명령 결과는 다음과 같습니다.

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.2.0     *               255.255.255.0   U     0      0        0 eth2
192.168.1.0     *               255.255.255.0   U     0      0        0 eth0
localnet        *               255.255.255.0   U     0      0        0 eth1
default         10.51.12.1      0.0.0.0         UG    0      0        0 eth1

제가 이것저것 찾아 본 내용데로 라면 리눅스(B)나 리눅스(C)쪽에서 게이트웨이 지정을 리눅스(A)쪽으로 해 놓고 리눅스(A)에서 뭔가를 해야 할거 같습니다만.

Mins의 이미지

공인 IP 를 얻어오는 리눅스 (A) 머신의 경우에는 별다른 설정을 하실 필요는 없고.

인터넷 공유를 하기 위한, 리눅스 (B,C) 머신의 경우에는 라우팅 경로를 A 머신으로 설정 해주시면 됩니다.

route add default gw 192.168.1.1

그리고 인터넷 공유를 위해서는 A 머신에서, iptables 나 ipchains 를 이용해 메스커레이딩 설정을 해줄 필요가 있겠죠.

PS. 그런데 특별한 경우가 아니라면, 사설 IP 의 자리를 통일하는게 좋지 않은가요? 저런식의 설정은 왠지 번거로울듯 한데요.

i_wish_awk_sed_perl의 이미지

음...결국은 리눅스(A)에서 iptables 로 NAT를 구성해야 한다는 소리인가요? 음...

아...그리고 저렇게 사설대를 나누어 놓은 이유는 네트워크를 3개로 쪼개어 놓아서 그렇습니다.

언제쯤 정규표현식을 정복할 수 있을까? ㅡㅡ;

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.