이것좀 봐주세요...ㅠㅠㅠ 몇시간째..ㅠㅠ

ShinDy의 이미지

리눅스에 대해선 초짜입니다..
인터넷 공유를 하고자 iptable 를 사용하여 어느분이 만들어주셨는데
윈도우 2000 에서는 잘동작하다가 XP 에서는 인터넷이 되었다안되었다 합니다.
거의 안됩니다..ㅠㅠ
그리구 텔넷과 FTP 도 안되구요..이렇게하면된다고했는데..

좀 고쳐주세요....보시면 아실꺼예요...
메인컴퓨터에 랜카드 두개꼽고 허브로 연결하여 클라이언트두대에 인터넷을
연결하려구요..

#!/bin/sh
#
IPTABLES=/sbin/iptables
HOST_IP="`ifconfig eth0 | grep 'inet addr' | awk '{print $2}' | sed -e 's/.*://'
`"
echo " - Verifying that all kernel modules are ok"
/sbin/depmod -a

/sbin/insmod ip_tables
/sbin/insmod ip_conntrack

/sbin/insmod ip_conntrack_ftp

/sbin/insmod iptable_nat

/sbin/insmod ip_nat_ftp
echo " - Enabling packet forwarding in the kernel"
echo "2" > /proc/sys/net/ipv4/ip_forward

echo " - Enabling dynamic addressing measures"
echo "2" > /proc/sys/net/ipv4/ip_dynaddr
$IPTABLES -P INPUT ACCEPT
$IPTABLES -F INPUT
$IPTABLES -P OUTPUT ACCEPT
$IPTABLES -F OUTPUT
$IPTABLES -P FORWARD ACCEPT
$IPTABLES -F FORWAR

echo " - FWD: Allow all connections OUT and only existing and related ones IN"
$IPTABLES -A FORWARD -i eth0 -o eth1 -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPTABLES -A FORWARD -i eth1 -o eth0 -j ACCEPT
$IPTABLES -A FORWARD -j LOG

$IPTABLES -A INPUT -i eth0 -p icmp -j DROP
$IPTABLES -A INPUT -i eth0 -p tcp --dport 1024 -j DROP
$IPTABLES -A INPUT -i eth0 -p tcp --dport sunrpc -j DROP

echo " - Enabling SNAT (MASQUERADE) functionality on eth0"
$IPTABLES -t nat -A POSTROUTING -o eth0 -j MASQUERADE

$IPTABLES -A INPUT -p udp --dport 177 -j ACCEPT
$IPTABLES -A INPUT -p tcp --dport 7100 -j ACCEPT
$IPTABLES -A INPUT -p tcp --dport telnet -j ACCEPT
$IPTABLES -A INPUT -p tcp --dport ssh -j ACCEPT
$IPTABLES -A INPUT -p tcp --dport login -j ACCEPT
$IPTABLES -A INPUT -p tcp --dport exec -j ACCEPT
$IPTABLES -A INPUT -p tcp --dport shell -j ACCEPT

#msn file send
$IPTABLES -t nat -A PREROUTING -p tcp -d $HOST_IP --dport 8080 -j DNAT --to 192.168.0.1:8080
$IPTABLES -t nat -A PREROUTING -p udp -d $HOST_IP --dport 8080 -j DNAT --to 192.168.0.1:8080
$IPTABLES -t nat -A PREROUTING -p tcp -d $HOST_IP --dport 23 -j DNAT --to 192.168.0.1:23
$IPTABLES -t nat -A PREROUTING -p udp -d $HOST_IP --dport 23 -j DNAT --to 192.168.0.1:23

sunyzero의 이미지

2000에서 작동하고 XP가 작동이 안된다면 NAT의 문제가 아니라 XP가 이상한게 아닌게 싶네요.

NAT설정 자체가 이상하다면 2000도 안되어야 정상입니다.

XP에서 netstat정보나 혹은 네트워크 설정이 제대로 되었는지 확인해보시기 바랍니다.

========================================
* The truth will set you free.

다즐링의 이미지

랜선을 체크해보세요.

ShinDy wrote:
리눅스에 대해선 초짜입니다..
인터넷 공유를 하고자 iptable 를 사용하여 어느분이 만들어주셨는데
윈도우 2000 에서는 잘동작하다가 XP 에서는 인터넷이 되었다안되었다 합니다.
거의 안됩니다..ㅠㅠ
그리구 텔넷과 FTP 도 안되구요..이렇게하면된다고했는데..

좀 고쳐주세요....보시면 아실꺼예요...
메인컴퓨터에 랜카드 두개꼽고 허브로 연결하여 클라이언트두대에 인터넷을
연결하려구요..

#!/bin/sh
#
IPTABLES=/sbin/iptables
HOST_IP="`ifconfig eth0 | grep 'inet addr' | awk '{print $2}' | sed -e 's/.*://'
`"
echo " - Verifying that all kernel modules are ok"
/sbin/depmod -a

/sbin/insmod ip_tables
/sbin/insmod ip_conntrack

/sbin/insmod ip_conntrack_ftp

/sbin/insmod iptable_nat

/sbin/insmod ip_nat_ftp
echo " - Enabling packet forwarding in the kernel"
echo "2" > /proc/sys/net/ipv4/ip_forward

echo " - Enabling dynamic addressing measures"
echo "2" > /proc/sys/net/ipv4/ip_dynaddr
$IPTABLES -P INPUT ACCEPT
$IPTABLES -F INPUT
$IPTABLES -P OUTPUT ACCEPT
$IPTABLES -F OUTPUT
$IPTABLES -P FORWARD ACCEPT
$IPTABLES -F FORWAR

echo " - FWD: Allow all connections OUT and only existing and related ones IN"
$IPTABLES -A FORWARD -i eth0 -o eth1 -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPTABLES -A FORWARD -i eth1 -o eth0 -j ACCEPT
$IPTABLES -A FORWARD -j LOG

$IPTABLES -A INPUT -i eth0 -p icmp -j DROP
$IPTABLES -A INPUT -i eth0 -p tcp --dport 1024 -j DROP
$IPTABLES -A INPUT -i eth0 -p tcp --dport sunrpc -j DROP

echo " - Enabling SNAT (MASQUERADE) functionality on eth0"
$IPTABLES -t nat -A POSTROUTING -o eth0 -j MASQUERADE

$IPTABLES -A INPUT -p udp --dport 177 -j ACCEPT
$IPTABLES -A INPUT -p tcp --dport 7100 -j ACCEPT
$IPTABLES -A INPUT -p tcp --dport telnet -j ACCEPT
$IPTABLES -A INPUT -p tcp --dport ssh -j ACCEPT
$IPTABLES -A INPUT -p tcp --dport login -j ACCEPT
$IPTABLES -A INPUT -p tcp --dport exec -j ACCEPT
$IPTABLES -A INPUT -p tcp --dport shell -j ACCEPT

#msn file send
$IPTABLES -t nat -A PREROUTING -p tcp -d $HOST_IP --dport 8080 -j DNAT --to 192.168.0.1:8080
$IPTABLES -t nat -A PREROUTING -p udp -d $HOST_IP --dport 8080 -j DNAT --to 192.168.0.1:8080
$IPTABLES -t nat -A PREROUTING -p tcp -d $HOST_IP --dport 23 -j DNAT --to 192.168.0.1:23
$IPTABLES -t nat -A PREROUTING -p udp -d $HOST_IP --dport 23 -j DNAT --to 192.168.0.1:23

------------------------------------------------------------------------------------------------
Life is in 다즐링

ShinDy의 이미지

XP 에서 당나귀를돌려서실행하는데당나귀에서는연결이되거든요...
근데 ping를해보면타임아웃이두번정도나와요...
아참 그리구 텔넷은 왜 안될까요.??? 좀 초보수준으로 알수있게
설명좀 해주시면 정말 고맙겠습니다...
현제 저게 맞는 설정인지 궁금합니다..

안녕하세요..방가워욥^^름과 비

ShinDy의 이미지

멀티부팅으로 윈2000 서버에서 는 정상적으로 작동이 잘되거든요...
XP 하고 98 에서는 왜 안되는지....흠....

본래 저렇게 구성하면 되야지 정상인가요.???

안녕하세요..방가워욥^^름과 비

sunyzero의 이미지

2000하고 윈98,XP가 서로 다른 프로토콜을 쓰는게 아니기 때문에 되어야 정상입니다. 제 생각엔 98,XP가 바이러스에 감염되었거나, 혹은 네트워크 부분 설정이 망가져 있든지 하는 경우가 거의 대부분일것입니다. 그렇지 않고서 안된다는 것은 상식적으로 말이 안됩니다.

========================================
* The truth will set you free.

무혼인형의 이미지

방화벽 쪽에 약간 이상한 부분이 보이는데요..

Quote:
#msn file send
$IPTABLES -t nat -A PREROUTING -p tcp -d $HOST_IP --dport 8080 -j DNAT --to 192.168.0.1:8080
$IPTABLES -t nat -A PREROUTING -p udp -d $HOST_IP --dport 8080 -j DNAT --to 192.168.0.1:8080
$IPTABLES -t nat -A PREROUTING -p tcp -d $HOST_IP --dport 23 -j DNAT --to 192.168.0.1:23
$IPTABLES -t nat -A PREROUTING -p udp -d $HOST_IP --dport 23 -j DNAT --to 192.168.0.1:23

이렇게 하면 msn 화일 전송이 돼나요? :? 포트번호만으로 보면 관계 없을 듯한데...

댓글 달기

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