[질문] 네트워크 카드 두개 설치해서 다른 네트워크 주소 사용하

uathebest의 이미지

환경
PC1은 랜카드 1개 있음.
PC2는 랜카드 2개 있음. (eth0은 외부 네트워크 연결된 상태, eth1은 PC1과 연결된 상태)

하고자 하는 작업)
외부핑은 PC2의 eth0만 가능하다.
로컬 네트워크끼리만 연결 가능하다.
말그대로, 유선으로 연결된 것 끼리만 통신이 되게 하고 싶습니다.

경우1)
PC1과 PC2의 eth1 카드를 사설로 잡고(192.....), PC2의 eth0 카드를 외부네트워크로 잡음.
PC2에서 외부 네트워크 주소로 핑을 쏘면 안됨.
PC2에서 PC1의 사설 주소로 핑을 쏘면 안됨.

경우2)
PC1과 PC2의 모든 카드를 외부 네트워크 주소로 잡음.
PC2에서 외부 주소로 핑을 쏘면 잘됨.
PC2에서 PC1 주소로 핑을 쏘면 안됨. (반대 역시 안됨)

여기저기 수소문 결과 라우팅 테이블을 만져주면 될듯 한데. 잘 모르겠습니다.
답글 부탁드립니다.

외부 ip는 111.... 이거라고 가정합니다

아래는 라우팅 테이블 입니다. (모두 외부 네트워크 잡았을 때)
111.111.111.111 * 255.255.255.192 U 0 0 0 eth1
111.111.111.111 * 255.255.255.192 U 0 0 0 eth1
111.111.111.111 * 255.255.255.0 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 111..... 0.0.0.0 UG 0 0 0 eth1
default 111..... 0.0.0.0 UG 0 0 0 eth0
default 111..... 0.0.0.0 UG 1 0 0 eth0

아래는 라우팅 테이블 입니다. (하나는 외부, 하나는 내부로 네트워크 잡았을 때)
111.111.111.111 * 255.255.255.192 U 0 0 0 eth0
111.111.111.111 * 255.255.255.0 U 0 0 0 eth1
111.111.111.0 * 255.255.255.0 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 192..... 0.0.0.0 UG 0 0 0 eth1
default 111..... 0.0.0.0 UG 0 0 0 eth0
default 111..... 0.0.0.0 UG 1 0 0 eth0

File attachments: 
첨부파일 크기
파일 2.bmp21.06 KB
파일 1.bmp21.06 KB
codebank의 이미지

http://wiki.kldp.org/wiki.php/%B3%D7%C6%AE%BF%F6%C5%B7#s-6.1.1

6.1.1 IP Masquerade
부분을 참고하세요. 요즘은 iptables로 가능하다고 알고 있습니다.

------------------------------
좋은 하루 되세요.

댓글 달기

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
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.