Surne: Dial-Up + ppp + routovanie - neviem co je s tym....

Zbynek Houska zbynh at seznam.cz
Sat Mar 27 19:29:52 CET 2004


On Sat, Mar 27, 2004 at 04:28:40PM +0100, FreeBSD - Devnet wrote:
> Potreboval by som vediet, ako nastavit routovanie:
> mam normalne klasicke Dialup pripujenie cez modem,
> lokalnu IP:192.168.0.1  a ip na nete mi dynamicky nastavuje provider
> 
> chcel by som vas poprosit, ako mam nastavit routovanie a ako by trebalo
> pozmenit ppp.conf, k internetu sa cez kppp pripojim normalne, ale neche
> vpustat ani odosielat nijake pakety..... predchadzajuce odpovede nefunguju
> 
> ROUTOVACIA TABULKA
> ------------------------
> Internet:
> Destination        Gateway            Flags    Refs      Use  Netif Expire
> default            192.168.0.1        UGSc        0        0    vr0
> 127.0.0.1          127.0.0.1          UH          0        8    lo0
> 192.168.0/31       ppp0               USc         1        6   ppp0 =>
> 192.168.0          link#1             UC          1        0    vr0
> 213.151.195.147    213.151.214.55     UH          0        0   ppp0
> 213.151.214.55     127.0.0.1          UH          0        0    lo0
> 
> Internet6:
> Destination                       Gateway                       Flags      
> Netif Expire
> ::1                               ::1                           UH          
> lo0
> fe80::%vr0/64                     link#1                        UC          
> vr0
> fe80::20c:76ff:fe12:5f82%vr0      00:0c:76:12:5f:82             UHL         
> lo0
> fe80::%lo0/64                     fe80::1%lo0                   Uc          
> lo0
> fe80::1%lo0                       link#3                        UHL         
> lo0
> ff01::/32                         ::1                           U           
> lo0
> ff02::%vr0/32                     link#1                        UC          
> vr0
> ff02::%lo0/32                     ::1                           UC          
> lo0
Takze ja bych prekompilval jadro a vyhodil podporu IPV6, ale to je mozn
udelat az vam to cele pojede.
> 
> /etc/rc.conf
> --------------------------
> defaultrouter="192.168.0.1"
Mistre, zde bude asi chyba, nemuzete preci odkazovat sam na sebe, pokud
tato masina slouzi jako gateway pro ostatni. Vyhodit!
> gateway_enable="YES"
> net.inet.ip.forwarding=1
> hostname="devnet.dev"
> ifconfig_vr0="inet 192.168.0.1  netmask 255.255.255.0"
> inetd_enable="NO"
> router_flags="-q"
> router="/sbin/routed"
> router_enable="YES"
Vyhodit routed! Pro domaci pouziti nepotrebne.
> 
> 
> /etc/ppp/ppp.conf
> ----------------------------
> default:
>  set log Phase Chat LCP IPCP CCP tun command
>  ident user-ppp VERSION (built COMPILATIONDATE)
> 
>  set device /dev/cual0
Tady by melo podle mne byt bud /dev/cuaa0 ci /dev/cuaa1 pac vice com
portu asi  nemate.
> 
>  set speed 115200
>  set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \
>            \"\" AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT"
>  set timeout 180			# 3 minute idle timer (the default)
>  enable dns				# request DNS info (for resolv.conf)
> 
>  set phone PHONE_NUM
>  set authname USERNAME
>  set authkey PASSWORD
> 
>  set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
>  add default HISADDR			# Add a (sticky) default route
> 
>  nat enable yes
Defaultni route bude pridana pomoci "add default HISADDR", je to dva
radky vyse. Doporucuju zakomentovat jakykoliv firewall.
 Az tohle udelate, tak se pripojite k providerovi, spustite na jedne
konzoli ping podle libosti a na druhe sputite tcpdump -i tun0 (pocitam,
ze se pripojujete pomoci modemu, jinak zmenit dle aktualniho zarizeni.
BTW, stoji za zvazeni zda je vhodne priste posilat celej skript do
konference tak jak jste to udelal vy.


Zbynek
-- 



More information about the Users-l mailing list