DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 30th April 2009
wimwauters wimwauters is offline
Port Guard
 
Join Date: Aug 2008
Posts: 36
Thanked 1 Time in 1 Post
Default Huawei E220 USB / UK Three.co.uk

Hi all,

thanks to this forum I got to a working config in the end

I'm on OpenBSD 4.4 release, all patched up ( and I just got my 4.5 cdroms today!)

My setup does not do automatic resolv.conf magic (I don't know, I'm guessing this a pppd feature that's not yet implemented?), so I just swap out prepared resolv.conf_* files

Also, as a roaming sysadmin I often swap interfaces, hence the deleting of default route all the bleeding time

here's the relevant files I created in
/etc/ppp/peers

Code:
# cat three 
/dev/cuaU0
crtscts
921600
modem
defaultroute
noauth
ipcp-restart 10
ipcp-accept-local
ipcp-accept-remote
0.0.0.0:10.64.64.64
connect "usr/sbin/chat -v -f /etc/ppp/peers/three.chat"
Code:
# cat three.chat                                                               
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
ABORT "ERROR"
ABORT "NO ANSWER"
ABORT "BUSY"
ABORT "Username/Password Incorrect"
TIMEOUT 15
"" "AT"
OK "ATZ"
OK "ATQ0V1E1S0=0&C1&D2+FCLASS=0"
OK 'AT+CGDCONT=1,"ip","three.co.uk"'
OK "ATDT*99#"
TIMEOUT 30
CONNECT \d\c
Code:
# cat call_three.sh                                                            
#!/bin/sh
echo Create PPP interface...
ifconfig ppp0 create
echo remove default route
route delete default
echo swap resolv.conf
cp /etc/resolv.conf_three /etc/resolv.conf
echo Sleeping for 5 seconds...
sleep 5
echo Starting pppd...
pppd call three
Code:
# cat close_three.sh 
#!/bin/sh                                                          
echo remove default route
route delete default
echo swap resolv.conf
cp /etc/resolv.conf_home /etc/resolv.conf
This setup allows both Three's and OpenDNS to work,
I got my Three DNS values from running it on my wife's Windos laptop.

Yes, you have to drop into root with su (or do sudo command line magic, not my cup of tea ) to ./call_three.sh and ./close_three.sh

Also, if you are a newbie (or rustie like me), it helps to
Code:
cat /var/logs/messages | grep pppd
a bit.

Last edited by wimwauters; 30th April 2009 at 04:48 PM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Huawei E220 USB / UK Vodafone DraconianTimes OpenBSD General 6 30th April 2009 12:53 AM
How to connect huawei tunnel0 with OpenBSD4.4 am1234 OpenBSD General 2 2nd March 2009 02:58 AM


All times are GMT. The time now is 05:34 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick