Date: Thu, 14 Dec 2000 00:50:55 -0000 From: "Ricardo Cosme" <ricjcosme@yahoo.com> To: <freebsd-questions@FreeBSD.ORG> Subject: Problem with NAT (on PPP) Message-ID: <000001c06567$f29ff520$0200a8c0@raptor>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Hello.
I installed FreeBSD 4.2, default Kernel. I want to enable NAT through PPP to
connect to the internet through my other windows boxes. The fact is that i
can't make it work. I configures windows the way the manual told. Do I have
to configure / install anything else on my FreeBSD box for the NAT to work ?
My config files:
rc.conf
# Enable network daemons for user convenience.
# -- sysinstall generated deltas -- #
linux_enable="YES"
sendmail_enable="NO"
moused_port="/dev/cuaa0"
moused_type="microsoft"
moused_enable="NO"
saver="logo"
keyrate="fast"
keymap="pt.iso"
gateway_enable="YES"
sshd_enable="YES"
inetd_enable="YES"
# -- sysinstall generated deltas -- #
font8x8="swiss-8x8"
font8x14="NO"
font8x16="swiss-8x16"
# -- sysinstall generated deltas -- #
font8x8="NO"
font8x14="NO"
font8x16="NO"
# -- sysinstall generated deltas -- #
ifconfig_rl0="inet 192.168.0.1 netmask 255.255.255.0"
hostname="kamikaze.home"
ppp_enable="YES"
ppp_mode="auto"
ppp_nat="YES"
ppp_profile="demand"
ppp.conf
default:
ident user-ppp VERSION (built COMPILATIONDATE)
# Ensure that "device" references the correct serial port
# for your modem. (cuaa0 = COM1, cuaa1 = COM2)
#
set device /dev/cuaa0
set log Phase Chat LCP IPCP CCP tun command
set speed 115200
set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \
\"\" AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT"
set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
set timeout 30 # 3 mintue idle timer (the default)
add default HISADDR # Add a (sticky) default route
enable dns # request DNS info (for resolv.conf)
nat enable yes
papchap:
#
# edit the next three lines and replace the items in caps with
# the values which have been assigned by your ISP.
#
set phone 671717000
set authname op13113
set authkey 12474946
interactive:
set authname op13113
set authkey 12474946
set phone 671717000
set timeout 300
set openmode active
accept chap
demand:
set authname op13113
set authkey 12474946
set phone 671717000
set timeout 300
set openmode active
accept chap
set ifaddr 127.1.1.1/0 127.2.2.2/0 255.255.255.0
add 0 0 127.2.2.2
ppp.linkup
# This section is used for the "demand" configuration in
# /etc/ppp/ppp.conf:
demand:
delete ALL
add 0 0 HISADDR
#
# All other configurations in /etc/ppp/ppp.conf use this:
#
MYADDR:
add 0 0 HISADDR
########################################################################
# End of /etc/ppp/ppp.linkup
ifconfig -a
rl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255
inet6 fe80::24f:4eff:fe06:459a%rl0 prefixlen 64 scopeid 0x1
ether 00:4f:4e:06:45:9a
media: autoselect (none) status: active
supported media: autoselect 100baseTX <full-duplex> 100baseTX
10baseT/UTP <full-duplex> 10baseT/UTP 100baseTX <hw-loopback>
lp0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> mtu 1500
faith0: flags=8000<MULTICAST> mtu 1500
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
gif1: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
gif2: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
gif3: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x8
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000
ppp0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
sl0: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 552
tun0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
inet6 fe80::24f:4eff:fe06:459a%tun0 --> :: prefixlen 64 scopeid 0xb
netstat -rn
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif
Expire
127.0.0.1 127.0.0.1 UH 0 0 lo0
192.168/16 tun0 USc 0 0 tun0
192.168.0.2 0:4f:4e:6:3e:dd UHLW 1 101 rl0 1118
192.168.0.3 0:80:5f:70:41:6a UHLW 1 7567 rl0 963
192.168.0.255 ff:ff:ff:ff:ff:ff UHLWb 2 53 rl0
Internet6:
Destination Gateway Flags
Netif Expire
::1 ::1 UH
lo0
fe80::%rl0/64 link#1 UC
rl0
fe80::%lo0/64 fe80::1%lo0 Uc
lo0
fe80::%tun0/64 link#11 UC
tun0
fe80::24f:4eff:fe06:459a%tun0 ::1 UH
lo0
fe80::%tun1/64 link#12 UC
tun1
fe80::24f:4eff:fe06:459a%tun1 ::1 UH
lo0
ff01::/32 ::1 U
lo0
ff02::%rl0/32 link#1 UC
rl0
ff02::%lo0/32 fe80::1%lo0 UC
lo0
ff02::%tun0/32 link#11 UC
tun0
Do I need to configure / install anything else ?
Thanks
Cosme
[-- Attachment #2 --]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 5.00.3103.1000" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN
class=138414200-14122000>Hello.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=138414200-14122000></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=138414200-14122000>I installed FreeBSD
4.2, default Kernel. I want to enable NAT through PPP to connect to the
internet through my other windows boxes. The fact is that i can't make it
work. I configures windows the way the manual told. Do I have to configure
/ install anything else on my FreeBSD box for the NAT to work
?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=138414200-14122000></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=138414200-14122000>My config
files:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=138414200-14122000></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=138414200-14122000><STRONG>rc.conf</STRONG></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=138414200-14122000># Enable network
daemons for user convenience.<BR># -- sysinstall generated deltas --
#<BR>linux_enable="YES"<BR>sendmail_enable="NO"<BR>moused_port="/dev/cuaa0"<BR>moused_type="microsoft"<BR>moused_enable="NO"<BR>saver="logo"<BR>keyrate="fast"<BR>keymap="pt.iso"<BR>gateway_enable="YES"<BR>sshd_enable="YES"<BR>inetd_enable="YES"<BR>#
-- sysinstall generated deltas --
#<BR>font8x8="swiss-8x8"<BR>font8x14="NO"<BR>font8x16="swiss-8x16"<BR># --
sysinstall generated deltas --
#<BR>font8x8="NO"<BR>font8x14="NO"<BR>font8x16="NO"<BR># -- sysinstall generated
deltas -- #<BR>ifconfig_rl0="inet 192.168.0.1 netmask
255.255.255.0"<BR>hostname="kamikaze.home"<BR>ppp_enable="YES"<BR>ppp_mode="auto"<BR>ppp_nat="YES"<BR>ppp_profile="demand"</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=138414200-14122000><STRONG>ppp.conf</STRONG></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=138414200-14122000>default:<BR> ident user-ppp VERSION (built
COMPILATIONDATE)</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=138414200-14122000> # Ensure that
"device" references the correct serial port<BR> # for your modem. (cuaa0 =
COM1, cuaa1 = COM2)<BR> #<BR> set device
/dev/cuaa0</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=138414200-14122000> set log Phase
Chat LCP IPCP CCP tun command<BR> set speed 115200<BR> set dial "ABORT
BUSY ABORT NO\\sCARRIER TIMEOUT 5
\<BR> \"\" AT
OK-AT-OK ATE1Q0 OK <A href="file://\\dATDT\\T">\\dATDT\\T</A> TIMEOUT 40
CONNECT"<BR> set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0
0.0.0.0<BR> set timeout
30
# 3 mintue idle timer (the default)<BR> add default
HISADDR
# Add a (sticky) default route<BR> enable
dns
# request DNS info (for resolv.conf)<BR> nat enable yes</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=138414200-14122000>papchap:</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=138414200-14122000> #<BR> #
edit the next three lines and replace the items in caps with<BR> # the
values which have been assigned by your ISP.<BR> #</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=138414200-14122000> set phone
671717000<BR> set authname op13113<BR> set authkey
12474946</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=138414200-14122000></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=138414200-14122000>interactive:<BR> set
authname op13113<BR> set authkey
12474946<BR> set phone
671717000<BR> set timeout
300<BR> set openmode
active<BR> accept chap</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=138414200-14122000>demand:
<BR> set authname
op13113<BR> set authkey
12474946<BR> set phone
671717000<BR> set timeout
300<BR> set openmode
active<BR> accept
chap<BR> set ifaddr 127.1.1.1/0 127.2.2.2/0
255.255.255.0<BR></SPAN></FONT><FONT face=Arial size=2><SPAN
class=138414200-14122000> add 0 0
127.2.2.2</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=138414200-14122000></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=138414200-14122000><STRONG>ppp.linkup</STRONG></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=138414200-14122000> #
This section is used for the "demand" configuration in<BR>
#
/etc/ppp/ppp.conf:<BR>demand:<BR>
delete ALL<BR> add 0 0
HISADDR<BR> #<BR> # All other configurations
in /etc/ppp/ppp.conf use this:<BR>
#<BR>MYADDR:<BR> add 0 0
HISADDR<BR>
########################################################################<BR>
# End of /etc/ppp/ppp.linkup<BR></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=138414200-14122000><STRONG>ifconfig
-a</STRONG></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=138414200-14122000>rl0:
flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu
1500<BR> inet 192.168.0.1 netmask
0xffffff00 broadcast 192.168.0.255<BR>
inet6 fe80::24f:4eff:fe06:459a%rl0 prefixlen 64 scopeid 0x1
<BR> ether 00:4f:4e:06:45:9a
<BR> media: autoselect (none) status:
active<BR> supported media: autoselect
100baseTX <full-duplex> 100baseTX 10baseT/UTP <full-duplex>
10baseT/UTP 100baseTX <hw-loopback><BR>lp0:
flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> mtu 1500<BR>faith0:
flags=8000<MULTICAST> mtu 1500<BR>gif0:
flags=8010<POINTOPOINT,MULTICAST> mtu 1280<BR>gif1:
flags=8010<POINTOPOINT,MULTICAST> mtu 1280<BR>gif2:
flags=8010<POINTOPOINT,MULTICAST> mtu 1280<BR>gif3:
flags=8010<POINTOPOINT,MULTICAST> mtu 1280<BR>lo0:
flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu
16384<BR> inet6 fe80::1%lo0 prefixlen
64 scopeid 0x8 <BR> inet6 ::1
prefixlen 128 <BR> inet 127.0.0.1
netmask 0xff000000 <BR>ppp0: flags=8010<POINTOPOINT,MULTICAST> mtu
1500<BR>sl0: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 552<BR>tun0:
flags=8010<POINTOPOINT,MULTICAST> mtu
1500<BR> inet6
fe80::24f:4eff:fe06:459a%tun0 --> :: prefixlen 64 scopeid 0xb
<BR></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=138414200-14122000><STRONG>netstat
-rn</STRONG></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=138414200-14122000>Routing
tables</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=138414200-14122000>Internet:<BR>Destination
Gateway
Flags Refs
Use Netif
Expire<BR>127.0.0.1
127.0.0.1
UH
0 0
lo0<BR>192.168/16
tun0
USc
0 0
tun0<BR>192.168.0.2
0:4f:4e:6:3e:dd UHLW
1 101
rl0 1118<BR>192.168.0.3
0:80:5f:70:41:6a UHLW
1 7567
rl0 963<BR>192.168.0.255
ff:ff:ff:ff:ff:ff UHLWb
2 53
rl0</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=138414200-14122000>Internet6:<BR>Destination
Gateway
Flags Netif
Expire<BR>::1
::1
UH
lo0<BR>fe80::%rl0/64
link#1
UC
rl0<BR>fe80::%lo0/64
fe80::1%lo0
Uc
lo0<BR>fe80::%tun0/64
link#11
UC
tun0<BR>fe80::24f:4eff:fe06:459a%tun0
::1
UH
lo0<BR>fe80::%tun1/64
link#12
UC
tun1<BR>fe80::24f:4eff:fe06:459a%tun1
::1
UH
lo0<BR>ff01::/32
::1
U
lo0<BR>ff02::%rl0/32
link#1
UC
rl0<BR>ff02::%lo0/32
fe80::1%lo0
UC
lo0<BR>ff02::%tun0/32
link#11
UC tun0</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=138414200-14122000></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=138414200-14122000></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=138414200-14122000>Do I need to
configure / install anything else ?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=138414200-14122000></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=138414200-14122000>Thanks</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=138414200-14122000>Cosme<BR></DIV></SPAN></FONT></BODY></HTML>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000001c06567$f29ff520$0200a8c0>
