faq
search
add article
cool-stuff
how-to
main
tips
parent
thread
|
Re: HOWTO: Connect to the internet with ppp
by Jason on Tuesday April 16, @11:00AM
|
| I think a startup script would be an easy way to allow for this, you could create the two dial-up ppp profiles in /etc/ppp/ppp.conf and call one from rc.donf and the other from a script in /usr/local/etc/rc.d/xyz.sh |
|
|
The Fine Print: The following comments
are owned by whoever posted them.
( Add a Reply )
|
Re: HOWTO: Connect to the internet with ppp
by lucky on Wednesday April 17, @01:18AM
|
#Maybe this will help any of those with ADSL or optic fibre using PPPoE:...
#The /etc/ppp/ppp.conf file
#dont forget to put a space when you start typing set...
#do not type <space>, use the space bar =)
default: #don't forget the column
<space>set device PPPoE:ed1 #assuming ed1 is the lan cards device address
<space>set MRU 1454
<space>set MTU 1454
<space>set log Phase Chat CCP tun command
<space>add default HISADDR
<space>accept chap
<space>alias enable yes
<space>add 0 0 HISADDR
<space>add 0 0 127.2.2.2
<space>set authname YOURLOGIN@YOUR_ISP
<space>set authkey YOURPASSWORD
#If you have static IPs, just change the add 0 0 HISADDR to add <ip> <ip> HISADDR
#The /etc/resolv.conf, add 2 lines...
#if you don't have this file....Make it.
nameserver 200.200.200.201 // ISP nameserver
nameserver 200.200.200.202 // ISP nameserver
#in /etc/hosts add 2 lines under ::1 (return) 127.0.0.1localhost localhost.my.domain
192.168.1.1 bsd bsd.my.domain
192.168.1.2 lucky lucky.my.domain
192.168.1.3 myotherpc myotherpc.my.domain
#in /etc/rc.conf add these lines
hostname="bsd.my.domainh
gateway_enable="YESh
network_interface="lo0 ed1h #assuming ed1 is the lan cards device address
ifconfig_lo0="inet1 127.0.0.1h
ifconfig_ed1="inet 192.168.1.1 netmask 255.255.255.0"
#for static ips, in your rc.conf...
ifconfig_lo0="inet 127.0.0.1"
ifconfig_ep1="inet 192.168.1.1 netmask 255.255.255.0"
ifconfig_tun0="inet <ip1> <ip2> netmask 255.255.255.255"
#replace <ip1+2> with your ips
#Easy to make a file in /usr/local/etc/rc.d/ to connect when you boot.
#easy way...
echo "ppp -ddial" > /usr/local/etc/rc.d/dialup.sh
chmod 777 /usr/local/etc/rc.d/dialup.sh
#reboot your machine. Don't have to but it makes life easy
#or you can just do it manually instead of dialup.sh
ppp -ddial
#and
killall ppp // to kill it =)
#If you now want to connect your windows machines to the internet using your BSD box as a gateway.
#in windows open the tcp/ip properties
#under IP address enter
192.168.1.2
255.255.255.0
#leave wins empty. In gateway enter
192.168.1.1
#in DNS settings select eUse DNSf and enter
lucky my.domain
#in the DNS server numbers add the 2 ip addresses from /etc/resolve.conf
in this case it was
200.200.200.201 // ISP nameserver
200.200.200.202 // ISP nameserver
#Now reboot that badboy and lets see if it works =)
I hope this can help somebody as I spent far too many hours trying to work this out.
|
[
Add a Reply to this ] |
The Fine Print: The following
comments are owned by whoever posted them.
( Article Reply )
|
|