routing problems...
發表於 : 01/19/2002 5:11 pm
I own a ADSL modern, which uses dynamic ip. Cause I want to setup 2 web site
that connect to my cube, I registered 2 domain name from dyndns.org, use
DNSUpdate to check ip automatically and enable virtual host in httpd.conf:
<BLOCKQUOTE><font size="1" face="XYZ">code:</font><HR><pre>
NameVirtualHost 192.168.1.2
<VirtualHost 192.168.1.2>
DocumentRoot /Library/WebServer/Documents/site1
ServerName site1.dyndns.org
</VirtualHost>
<VirtualHost 192.168.1.2>
DocumentRoot /Library/WebServer/Documents/site2
ServerName site2.dyndns.org
</VirtualHost>
</pre><HR></BLOCKQUOTE>
Then I enable web server, people from internet can easily acess these two sites
without difficult, cause my ADSL modern use SUA, it will automatically transfers
any requests that from internet to 192.168.1.2 (which is my Cube).
But the annoying problem happened in my Cube. When I open my browsers, and
type "http://site1.dyndns.org", OS X just treat it as the external IP address, like
61.224.0.101 etc. Then the packages go out through my ADSL modern (192.168.1.1)
and never come back.
<BLOCKQUOTE><font size="1" face="XYZ">code:</font><HR><pre>
[localhost:~] digdog% netstat -nr
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
default 192.168.1.1 UGSc 198 4 en0
127.0.0.1 127.0.0.1 UH 6 2384 lo0
192.168.1 link#2 UC 0 0 en0
192.168.1.1 0:a0:c5:2b:72:12 UHLW 199 1140 en0 780
192.168.1.2 127.0.0.1 UHS 0 18 lo0
192.168.1.3 0:5:5d:b:b:35 UHLW 1 67 en0 640
192.168.1.255 ff:ff:ff:ff:ff:ff UHLWb 3 154 en0
[localhost:~] digdog% traceroute site1.dyndns.org
traceroute to site1.dyndns.org (61.224.0.90), 30 hops max, 40 byte packets
1 192.168.1.1 (192.168.1.1) 3.589 ms 3.913 ms 1.559 ms
</pre><HR></BLOCKQUOTE>
Then I realize I should open my NetInfo Manager, to add some localhost data, but
no matter how I map then, such as site1.dyndns.org maps to 127.0.0.1 or 192.168.1.2,
the packages still go to 192.168.1.1, and get lost.
So my question is, is there any way I could link back to my site from localhost without using proxy?
[ 01-19-2002: 留言編輯者: digdog ]
that connect to my cube, I registered 2 domain name from dyndns.org, use
DNSUpdate to check ip automatically and enable virtual host in httpd.conf:
<BLOCKQUOTE><font size="1" face="XYZ">code:</font><HR><pre>
NameVirtualHost 192.168.1.2
<VirtualHost 192.168.1.2>
DocumentRoot /Library/WebServer/Documents/site1
ServerName site1.dyndns.org
</VirtualHost>
<VirtualHost 192.168.1.2>
DocumentRoot /Library/WebServer/Documents/site2
ServerName site2.dyndns.org
</VirtualHost>
</pre><HR></BLOCKQUOTE>
Then I enable web server, people from internet can easily acess these two sites
without difficult, cause my ADSL modern use SUA, it will automatically transfers
any requests that from internet to 192.168.1.2 (which is my Cube).
But the annoying problem happened in my Cube. When I open my browsers, and
type "http://site1.dyndns.org", OS X just treat it as the external IP address, like
61.224.0.101 etc. Then the packages go out through my ADSL modern (192.168.1.1)
and never come back.
<BLOCKQUOTE><font size="1" face="XYZ">code:</font><HR><pre>
[localhost:~] digdog% netstat -nr
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
default 192.168.1.1 UGSc 198 4 en0
127.0.0.1 127.0.0.1 UH 6 2384 lo0
192.168.1 link#2 UC 0 0 en0
192.168.1.1 0:a0:c5:2b:72:12 UHLW 199 1140 en0 780
192.168.1.2 127.0.0.1 UHS 0 18 lo0
192.168.1.3 0:5:5d:b:b:35 UHLW 1 67 en0 640
192.168.1.255 ff:ff:ff:ff:ff:ff UHLWb 3 154 en0
[localhost:~] digdog% traceroute site1.dyndns.org
traceroute to site1.dyndns.org (61.224.0.90), 30 hops max, 40 byte packets
1 192.168.1.1 (192.168.1.1) 3.589 ms 3.913 ms 1.559 ms
</pre><HR></BLOCKQUOTE>
Then I realize I should open my NetInfo Manager, to add some localhost data, but
no matter how I map then, such as site1.dyndns.org maps to 127.0.0.1 or 192.168.1.2,
the packages still go to 192.168.1.1, and get lost.
So my question is, is there any way I could link back to my site from localhost without using proxy?
[ 01-19-2002: 留言編輯者: digdog ]