Date: Sun, 17 Mar 2002 15:40:22 +0500 From: "Dmitry A. Bondareff" <freebsd@mmk.ru> To: "Xawiers" <xawiers@mail.lt>, <freebsd-net@FreeBSD.ORG> Subject: Re: Trouble to connect FreeBSD 4.5 to internet Message-ID: <001b01c1cda0$264fccf0$02020101@dimasic> References: <001501c1cb5b$48dba060$02000b0a@ksaveras> <01fb01c1ccd1$19c0ee30$02020101@dimasic> <001101c1ccf6$215abb60$02000b0a@ksaveras>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
I thing so:
/etc/rc.conf:
# This is for external interface
ifconfig_ed0="inet 192.168.100.253 netmask 255.255.255.0"
# This is for internal interface
ifconfig_xl0="inet internalIP netmask 255.255.255.0"
# Add default to ISP
defaultrouter="192.168.100.254"
# Enable your system as Router
gateway_enable="YES"
# Enable NAT
ipnat_enable="YES"
ipnat_rules="/etc/ipnat.conf"
Then add the rule for NAT
/etc/ipnat.conf:
map ed0 internalnet/24 -> 195.14.167.39/32
--------------------------------------------------------------------------------------
Warning:
ISP must add the next in his routing table
# route add -host 195.14.167.39 192.168.100.253
Or try on your side
arp -s 195.14.167.39 MAC pub
where MAC is MACaddress of your external ethernet card.
--------------------------------------------------------------------------------------
Regards,
aka Dimasic.
----- Original Message -----
From: Xawiers
To: Dmitry A. Bondareff ; freebsd-net@FreeBSD.ORG
Sent: Saturday, March 16, 2002 7:23 PM
Subject: Re: Trouble to connect FreeBSD 4.5 to internet
Hello again
so how shoult I config that with natd ?
Could someone write any examples?
--------------------
Xawiers
----- Original Message -----
From: Dmitry A. Bondareff
To: freebsd-net@FreeBSD.ORG
Sent: Saturday, March 16, 2002 10:58 AM
Subject: Re: Trouble to connect FreeBSD 4.5 to internet
Hmm.
It's too strange configuration.
The ISP must to do translation to 195.14.167.39 on him box.
May be he think that you must do it.
Try to using NAT on your box.
And netmask wrong too !
Regards,
aka Dimasic.
----- Original Message -----
From: Xawiers
To: freebsd-net@FreeBSD.ORG
Sent: Thursday, March 14, 2002 6:22 PM
Subject: Trouble to connect FreeBSD 4.5 to internet
Hello,
I have trouble to connect FreeBSD to internet.
Our ISP gave me these datas about network
Gateway: 192.168.100.254
My external IP: 195.14.167.39
Netmask: 255.255.255.254
what i did:
First I added alias, because I cant see my gateway - no ping response (not in the same subnet)
ifconfig ed0 inet 192.168.100.253 netmask 255.255.255.0 alias
And I add default gateway:
route add default 192.168.100.254
now my GW responses for ping, but internet - no
How I coud resolve this problem.
P.S. sorry for my english
Best regards
Xawiers
[-- Attachment #2 --]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=windows-1257" http-equiv=Content-Type>
<META content="MSHTML 5.00.3315.2870" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face="Arial Cyr" size=2>I thing so:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Arial Cyr" size=2>/etc/rc.conf:</FONT></DIV>
<DIV><FONT face="Arial CYR" size=2># This is for <STRONG>external
</STRONG>interface</FONT></DIV>
<DIV><FONT face="Arial CYR" size=2>ifconfig_ed0="inet 192.168.100.253 netmask
255.255.255.0"</FONT></DIV>
<DIV><FONT face="Arial CYR" size=2># This is for <STRONG>internal
</STRONG>interface</FONT></DIV>
<DIV><FONT face="Arial CYR" size=2>ifconfig_xl0="inet internalIP netmask
255.255.255.0"</FONT></DIV>
<DIV><FONT face="Arial CYR" size=2># Add default to ISP</FONT></DIV>
<DIV><FONT face="Arial CYR" size=2>defaultrouter="192.168.100.254"</FONT></DIV>
<DIV><FONT face="Arial CYR" size=2># Enable your system as Router</FONT></DIV>
<DIV><FONT face="Arial CYR" size=2>gateway_enable="YES"</FONT></DIV>
<DIV><FONT face="Arial CYR" size=2># Enable NAT</FONT></DIV>
<DIV><FONT face="Arial Cyr"
size=2>ipnat_enable="YES"<BR>ipnat_rules="/etc/ipnat.conf"</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Arial CYR" size=2>Then add the rule for NAT</FONT></DIV>
<DIV><FONT face="Arial CYR" size=2>/etc/ipnat.conf:</FONT></DIV>
<DIV><FONT face="Arial Cyr" size=2>map ed0
<STRONG>internalnet</STRONG>/24<STRONG> </STRONG>->
195.14.167.39/32</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Arial Cyr"
size=2>--------------------------------------------------------------------------------------</FONT></DIV>
<DIV><FONT face="Arial CYR" size=2><STRONG>Warning: </STRONG></FONT></DIV>
<DIV><FONT face="Arial CYR" size=2><STRONG>ISP must add the next in his routing
table</STRONG></FONT></DIV>
<DIV><FONT face="Arial CYR" size=2><STRONG># route add -host 195.14.167.39
192.168.100.253 </STRONG></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Arial CYR" size=2><STRONG>Or try on your side
</STRONG></FONT></DIV>
<DIV><FONT face="Arial CYR" size=2><STRONG>arp -s 195.14.167.39 MAC
pub</STRONG></FONT></DIV>
<DIV><FONT face="Arial CYR" size=2><STRONG>where MAC is MACaddress of your
external ethernet card.</STRONG></FONT></DIV>
<DIV><FONT face="Arial Cyr"
size=2>--------------------------------------------------------------------------------------</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Arial CYR" size=2>Regards,</FONT></DIV>
<DIV><FONT face="Arial CYR" size=2>aka Dimasic.</FONT></DIV>
<BLOCKQUOTE dir=ltr
style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A href="mailto:xawiers@mail.lt" title=xawiers@mail.lt>Xawiers</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A href="mailto:freebsd@mmk.ru"
title=freebsd@mmk.ru>Dmitry A. Bondareff</A> ; <A
href="mailto:freebsd-net@FreeBSD.ORG"
title=freebsd-net@FreeBSD.ORG>freebsd-net@FreeBSD.ORG</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Saturday, March 16, 2002 7:23
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: Trouble to connect FreeBSD
4.5 to internet</DIV>
<DIV><BR></DIV>
<DIV><FONT face=Arial size=2>Hello again</FONT></DIV>
<DIV><FONT face=Arial size=2>so how shoult I config that with natd
?</FONT></DIV>
<DIV><FONT face=Arial size=2>Could someone write any examples?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV>--------------------<BR>Xawiers</DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV>----- Original Message ----- </DIV>
<BLOCKQUOTE dir=ltr
style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A href="mailto:freebsd@mmk.ru" title=freebsd@mmk.ru>Dmitry A. Bondareff</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
href="mailto:freebsd-net@FreeBSD.ORG"
title=freebsd-net@FreeBSD.ORG>freebsd-net@FreeBSD.ORG</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Saturday, March 16, 2002 10:58
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: Trouble to connect FreeBSD
4.5 to internet</DIV>
<DIV><BR></DIV>
<DIV><FONT face="Arial Cyr" size=2>
<DIV><FONT face="Arial Cyr" size=2>Hmm.</FONT></DIV>
<DIV><FONT face="Arial CYR" size=2>It's too strange configuration.
</FONT></DIV>
<DIV><FONT face="Arial CYR" size=2>The ISP must to do translation to
195.14.167.39 on him box.</FONT></DIV>
<DIV><FONT face="Arial CYR" size=2>May be he think that you must do
it.</FONT></DIV>
<DIV><FONT face="Arial CYR" size=2>Try to using NAT on your
box.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Arial Cyr">And netmask wrong too !</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Arial CYR" size=2>Regards,</FONT></DIV>
<DIV><FONT face="Arial CYR" size=2>aka Dimasic.</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV></FONT>----- Original Message ----- </DIV></DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A href="mailto:xawiers@mail.lt" title=xawiers@mail.lt>Xawiers</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
href="mailto:freebsd-net@FreeBSD.ORG"
title=freebsd-net@FreeBSD.ORG>freebsd-net@FreeBSD.ORG</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, March 14, 2002 6:22
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Trouble to connect FreeBSD
4.5 to internet</DIV>
<DIV><BR></DIV><FONT face=Arial size=2>
<DIV>Hello,</DIV>
<DIV>I have trouble to connect FreeBSD to internet.</DIV>
<DIV>Our ISP gave me these datas about network</DIV>
<DIV>Gateway: 192.168.100.254</DIV>
<DIV>My external IP: 195.14.167.39</DIV>
<DIV>Netmask: 255.255.255.254</DIV>
<DIV> </DIV>
<DIV>what i did:</DIV>
<DIV>First I added alias, because I cant see my gateway - no ping response
(not in the same subnet)</DIV>
<DIV> </DIV>
<DIV>ifconfig ed0 inet 192.168.100.253 netmask 255.255.255.0 alias</DIV>
<DIV> </DIV>
<DIV>And I add default gateway:</DIV>
<DIV> </DIV>
<DIV>route add default 192.168.100.254</DIV>
<DIV> </DIV>
<DIV>now my GW responses for ping, but internet - no </DIV>
<DIV>How I coud resolve this problem.</DIV>
<DIV> </DIV>
<DIV>P.S. sorry for my english</DIV>
<DIV>Best regards</DIV>
<DIV>Xawiers</FONT></DIV></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?001b01c1cda0$264fccf0$02020101>
