| View previous topic :: View next topic |
| Author |
Message |
cillianderoiste n00b

Joined: 19 Apr 2005 Posts: 13 Location: London
|
Posted: Sat Mar 18, 2006 6:36 pm Post subject: |
|
|
That's a great tip!
So, I guess to do things without getting too intimate with iptables I can turn off the rules that require an internet connection (e.g. internet sharing and dhcp) through firestarter and then use iptables save to keep those settings for iptables. Then I can change the three initscripts to start in sequence iptables, myppp, firestarter by using before or after in the depends() sections.
I guess I could even just set up iptables to block everything until firestarter kicks in.
I've never come across this idea before. Mostly people say to set up iptables by hand but even then I guess you'd want to run iptables also after connecting to the internet to add the extra rules. |
|
| Back to top |
|
 |
PaulBredbury Watchman


Joined: 14 Jul 2005 Posts: 7310
|
Posted: Sat Mar 18, 2006 6:56 pm Post subject: |
|
|
| cillianderoiste wrote: | | I can turn off the rules that require an internet connection (e.g. internet sharing and dhcp) |
Are you sure that those rules require an Internet connection? Most don't. |
|
| Back to top |
|
 |
peka l33t


Joined: 16 Mar 2005 Posts: 773 Location: Płońsk, Poland
|
Posted: Mon Mar 20, 2006 8:38 pm Post subject: |
|
|
Guys,
... forgive me... I've been away from my linux box for a couple of months...
... but what exactlty do you mean by saying "firestarter" here?
As for the rules that require Internet connection. I agree with PB here, I can't remember using any for my Desktop PC. My rules consist of literaly 8 commands  _________________ p3k4
Seize the time, Meribor. Live now; make now always the most precious time. Now will never come again...
Jean-Luc Picard, Star Trek TNG - The Inner Light |
|
| Back to top |
|
 |
PaulBredbury Watchman


Joined: 14 Jul 2005 Posts: 7310
|
Posted: Mon Mar 20, 2006 9:53 pm Post subject: |
|
|
emerge -s firestarter  |
|
| Back to top |
|
 |
peka l33t


Joined: 16 Mar 2005 Posts: 773 Location: Płońsk, Poland
|
Posted: Mon Mar 20, 2006 10:35 pm Post subject: |
|
|
...oopsy daisies.. silly me..
..been away too long.
I just wrote a few lines of iptables rules so long agoI didin't realize people make GUI for them nowdays  _________________ p3k4
Seize the time, Meribor. Live now; make now always the most precious time. Now will never come again...
Jean-Luc Picard, Star Trek TNG - The Inner Light |
|
| Back to top |
|
 |
ali3nx l33t


Joined: 21 Sep 2003 Posts: 722 Location: Winnipeg, Canada
|
Posted: Sun Apr 16, 2006 12:38 am Post subject: |
|
|
I've been helping a collegue from poland who's a
user of Net24 try to setup his modem. We had initially started building his
gentoo system in a chroot on a working mandrake install after which I stage4
tarballed the filesystem which he later installed from local livecd.Were are
currently in progress with testing the network setup. I've mostly used the
README included with the speedtouch-usb package as a guide for setting up the
net scripts but we've run into a few snags as it appears the syntax used in
section b) pppoE preup() configuration is invalid or incorrect with the latest
baselayout or bash release. --makepid is supposed to be --make-pidfile after
which --exec should follow for the command. I can only relay what i've been
offered from a less experienced but still agile user in poland who i'm sure
would be extatic if someone has a solution for these errors. We had edited the
start-stop-daemon syntax used for preup() in /etc/conf.d/net however the
following errors resulted. Thanks in advance.
/etc/conf.d/net:line644:syntax error unexpected token {
/etc/conf.d/net:line644:"function preup() {"
Below is the current revision we have in place follwed by the README examples
for pppoe.
| Code: | function preup() {
if [[ "$1" = "ppp0" ]] ; then
modprobe -q speedtch
# The number after "-c" corresponds with the Ethernet
interface,
# e.g. 0 for nas0.
# Use "-e 0" for LLC mux or "-e 1" for VC mux.
# The 2 numbers after "-a" represent the VPI & VCI of your ISP,
and
# they are separated by a dot. Choose here, or ask your ISP:
# http://www.linux-usb.org/SpeedTouch/faq/index.html#q12
eval local nasifname=\$\{link_$1\}
start-stop-daemon --start --pidfile /var/run/${nasifname}.pid --make-pidfile \
--exec br2684ctl -c ${nasifname#nas} -e 0 -a 8.35
fi
}
function postdown() {
if [[ "$1" = "ppp0" ]] ; then
eval local nasifname=\$\{link_$1\}
start-stop-daemon --stop --pidfile /var/run/${nasifname}.pid
fi
} |
speedtouch-usb README.diff from bug 110665
| Code: |
b) PPPoE configuration:
+
+config_ppp0=( 'ppp' ) # Runs /lib/rcscripts/net.modules.d/pppd
+# The name of the Ethernet interface over which PPPoE links
+link_ppp0='nas0' # Must correspond to the -c option of the br2684ctl utility
+plugins_ppp0=( pppoe )
+# 'man pppd' shows other options. Compression is disabled because it is
+# rarely taken advantage of, and may interfere with the connection.
+# Add option 'usepeerdns' to populate /etc/ppp/resolv.conf
+pppd_ppp0=( updetach debug defaultroute noaccomp nobsdcomp noccp
+ nodeflate nopcomp novj novjccomp )
+username_ppp0='username@isp.com' # E.g. 'fredbloggs@hg5.btclick.com'
+password_ppp0='password' # ADSL password, assigned by your ISP
+
+# If the kernel modules are not built-in, then they must be loaded
+# before starting the PPP daemon:
+function preup() {
+ if [[ "$1" = "ppp0" ]] ; then
+ modprobe -q speedtch
+ # The number after "-c" corresponds with the Ethernet
interface,
+ # e.g. 0 for nas0.
+ # Use "-e 0" for LLC mux or "-e 1" for VC mux.
+ # The 2 numbers after "-a" represent the VPI & VCI of your ISP,
and
+ # they are separated by a dot. Choose here, or ask your ISP:
+ # http://www.linux-usb.org/SpeedTouch/faq/index.html#q12
+ eval local nasifname=\$\{link_$1\}
+ start-stop-daemon --start --pidfile /var/run/${nasifname}.pid
--makepid -- \
+ br2684ctl -c ${nasifname#nas} -e 0 -a 0.38
+ fi
+}
+
+function postdown() {
+ if [[ "$1" = "ppp0" ]] ; then
+ eval local nasifname=\$\{link_$1\}
+ start-stop-daemon --stop --pidfile /var/run/${nasifname}.pid
+ fi
+} |
_________________ Compiling Gentoo since version 1.4
Thousands of Gentoo Installs Completed
Emerged on every continent but Antarctica
Compile long and Prosper!
Last edited by ali3nx on Tue Jun 20, 2006 4:04 am; edited 1 time in total |
|
| Back to top |
|
 |
NW.Smok n00b


Joined: 16 Apr 2006 Posts: 12 Location: Rumia, Poland
|
Posted: Sun Apr 16, 2006 1:31 am Post subject: |
|
|
Well so far so good thanks to ali3nx's help im making progress but still there is a problem. Here's my net file:
| Code: |
function preup() {
if [[ "$1" = "ppp0" ]] ; then
modprobe -q speedtch
# The number after "-c" corresponds with the Ethernet interface,
# e.g. 0 for nas0.
# Use "-e 0" for LLC mux or "-e 1" for VC mux.
# The 2 numbers after "-a" represent the VPI & VCI of your ISP, and
# they are separated by a dot. Choose here, or ask your ISP:
# http://www.linux-usb.org/SpeedTouch/faq/index.html#q12
eval local nasifname=\$\{link_$1\}
start-stop-daemon --start --pidfile /var/run/${nasifname}.pid --make-pidfile --exec \
/sbin/br2684ctl -c ${nasifname#nas} -e 0 -a 8.35
fi
}
|
The problem now is the value -a 8.35 in the last line. When i run:
| Code: |
/etc/init.d/net.ppp0 start
|
an error apears saying
| Quote: |
/sbin/start-stop-deamon: Unable to start 8.35 No such file or directory
|
It seems very strange to me that the deamont wants to start a specified value for VPI and VCI...
If anyone has any ideas i would be gratefull for help  |
|
| Back to top |
|
 |
PaulBredbury Watchman


Joined: 14 Jul 2005 Posts: 7310
|
Posted: Sun Apr 16, 2006 5:24 am Post subject: |
|
|
| NW.Smok wrote: | start-stop-daemon --start --pidfile /var/run/${nasifname}.pid --make-pidfile --exec \
/sbin/br2684ctl -c ${nasifname#nas} -e 0 -a 8.35 |
I don't use pppoe, but I think that line should be:
| Code: | start-stop-daemon --start --pidfile /var/run/${nasifname}.pid --make-pidfile \
--exec /sbin/br2684ctl -- -c ${nasifname#nas} -e 0 -a 8.35 |
Where "--" indicates that the -c, -e and -a parameters should be passed to br2684ctl rather than start-stop-daemon. |
|
| Back to top |
|
 |
NW.Smok n00b


Joined: 16 Apr 2006 Posts: 12 Location: Rumia, Poland
|
Posted: Sun Apr 16, 2006 8:48 am Post subject: |
|
|
PaulBredbury big thanks for your help it fixed this issue but there is another one.
when i started the connection i got this:
| Code: |
Interface "nas0" created succesfully
Communicating over ATM 0.8.35, encapsulation: LLC
Interface configured
RFC 1483/2684 bridge deamon started
|
This looks ok to me but /var/log/messages showed this:
| Code: |
add event not handled
|
ifconfig shows results actually typical for a computer without a modem
anybody got any ideas??
It apears that the "correct" net file setting made my gentoo boot impossible when i switch to verbose mode i see this:
| Code: |
RFC 1483/2684 bridge deamon started
|
and gentoo stops to boot (in graphic mode its about 73-76%) |
|
| Back to top |
|
 |
mrness Retired Dev


Joined: 17 Feb 2004 Posts: 375 Location: bucharest.ro
|
Posted: Mon Apr 17, 2006 6:04 am Post subject: |
|
|
1) after you correct /etc/conf.d/net and run /etc/init.d/net.ppp0 start, do you have a nas0 interface? I mean, what output does "ip addr" command have?
2) if you put "echo nas started" after start-stop-daemon...., does /etc/init.d/net.ppp0 start displays "nas started" ?
Sorry for the mistakes made in README, butyou are actually the first PPPoE user who bothered to contact us regarding this matter (see ADSL thomson speedtouch USB PPPoE).
Please don't go away till this issue is solved. |
|
| Back to top |
|
 |
NW.Smok n00b


Joined: 16 Apr 2006 Posts: 12 Location: Rumia, Poland
|
Posted: Mon Apr 17, 2006 8:53 am Post subject: |
|
|
Ill put it like this: For the help that ali3nx gave me i do have a big favour to return to the comunity so if you could be so kind and tell me where i can find more regular contact with you (irc etc) in order to do it quick than ofc i wont quit You as the devoloper could than post a topic here with the general guidence. As for the commands you and questions, Ill take a look and post it back  |
|
| Back to top |
|
 |
mrness Retired Dev


Joined: 17 Feb 2004 Posts: 375 Location: bucharest.ro
|
Posted: Mon Apr 17, 2006 8:59 am Post subject: |
|
|
| As you can see, I am available (more or less, depending on workload) on ICQ and MSN. |
|
| Back to top |
|
 |
mrness Retired Dev


Joined: 17 Feb 2004 Posts: 375 Location: bucharest.ro
|
Posted: Mon Apr 17, 2006 1:59 pm Post subject: |
|
|
| Thanks to Smok who was kind enough to test it, the README was corrected and revision has been bumped. |
|
| Back to top |
|
 |
NW.Smok n00b


Joined: 16 Apr 2006 Posts: 12 Location: Rumia, Poland
|
Posted: Mon Apr 17, 2006 2:39 pm Post subject: |
|
|
Correction:
YOU were the kind one that helped me out with this  |
|
| Back to top |
|
 |
ali3nx l33t


Joined: 21 Sep 2003 Posts: 722 Location: Winnipeg, Canada
|
Posted: Mon Apr 17, 2006 8:22 pm Post subject: |
|
|
what goes around comes around... most of the time  _________________ Compiling Gentoo since version 1.4
Thousands of Gentoo Installs Completed
Emerged on every continent but Antarctica
Compile long and Prosper! |
|
| Back to top |
|
 |
kynx n00b

Joined: 13 Dec 2004 Posts: 34
|
Posted: Wed May 03, 2006 10:43 am Post subject: |
|
|
Hi there,
I've followed the wiki and readme to try and get my speedtouch-usb working, but it doesn't want to. I must be doing something stupid, but for the life of me, can't figure out what. It seems to load the modules just fine, but then exits without bringing up the connection:
/var/log/messages:
| Code: | May 3 11:26:35 gum pppd[19346]: Plugin pppoatm.so loaded.
May 3 11:26:35 gum pppd[19346]: PPPoATM plugin_init
May 3 11:26:35 gum pppd[19346]: PPPoATM setdevname_pppoatm - SUCCESS:0.38
May 3 11:26:35 gum pppd[19346]: pppd 2.4.3 started by root, uid 0
May 3 11:26:35 gum pppd[19346]: Exit. |
My setup:
speedtouch-usb-3.0.1.2-r1
ppp-2.4.3-r14
baselayout-1.12.0_pre19-r1
gentoo-sources-2.6.16-r5
udev-090
/etc/conf.d/net:
| Code: | # SpeedTouch ADSL Modem set
# see /usr/share/doc/speedtouch-usb-3.0.1.2/README.gz
config_ppp0=( 'ppp' ) # Runs /lib/rcscripts/net.modules.d/pppd
link_ppp0='/dev/null' # Not required by PPPoA links, but must be specified
# The 2 numbers represent the VPI & VCI of your ISP, and they are separated
# by a dot. Choose here, or ask your ISP:
# http://www.linux-usb.org/SpeedTouch/faq/index.html#q12
plugins_ppp0=( 'pppoa 0.38' )
# 'man pppd' shows other options. Compression is disabled because it is
# rarely taken advantage of, and may interfere with the connection.
# Add option 'usepeerdns' to populate /etc/ppp/resolv.conf
pppd_ppp0=( updetach debug defaultroute noaccomp nobsdcomp noccp nodeflate nopcomp novj novjccomp passive usepeerdns )
username_ppp0='******@************' # E.g. 'fredbloggs@hg5.btclick.com'
password_ppp0='***********' # ADSL password, assigned by your ISP
# If the kernel modules are not built-in, then they must be loaded
# before starting the PPP daemon:
function preup() {
if [[ "$1" = "ppp0" ]] ; then
modprobe -q speedtch
return 0
fi
} |
I don't know if it's related in any way, but when I run /etc/init.d/net.ppp0 stop I get:
| Code: | * Stopping ppp0
* Bringing down ppp0 [ ok ]
/lib/rcscripts/net/br2684ctl.sh: line 56: itype: command not found |
Anyone got any suggestions? |
|
| Back to top |
|
 |
kynx n00b

Joined: 13 Dec 2004 Posts: 34
|
Posted: Wed May 03, 2006 11:18 am Post subject: |
|
|
| kynx wrote: | | Anyone got any suggestions? |
Typical. The moment you take the car to the garage it starts working.
I'm not 100% what the culprit was, but I had just emerged hotplug - previously I'd only had hotplug-base - and emerged coldpug. Should they be dependencies for speedtouch-usb?
Thanks for the package, anyway - it's working a treat now. |
|
| Back to top |
|
 |
mrness Retired Dev


Joined: 17 Feb 2004 Posts: 375 Location: bucharest.ro
|
Posted: Wed May 03, 2006 11:49 am Post subject: |
|
|
| I think udev needs hotplug. another user found that it needs to install hotplug because udev failed to load the firmware otherwise. |
|
| Back to top |
|
 |
molot Apprentice


Joined: 26 Feb 2005 Posts: 214 Location: Warsaw, Poland
|
Posted: Sun May 21, 2006 6:50 pm Post subject: |
|
|
Just asking... Did anyone managed to do this using the /etc/conf.d/net configuration file? If someone from Poland reads this: yes, Neostrada again, and this time I'd like to do this "official" way. While there already are script that can manage pppoa, I don't want to put my own one to basically do the same. _________________ "I just have to run faster than the slowest party member"
Last edited by molot on Tue May 23, 2006 12:20 pm; edited 1 time in total |
|
| Back to top |
|
 |
PaulBredbury Watchman


Joined: 14 Jul 2005 Posts: 7310
|
Posted: Mon May 22, 2006 12:35 am Post subject: |
|
|
udev-090 depends on hotplug-base, but not hotplug. So I uninstalled hotplug and rebooted, and it works fine (using pppoa). My installed versions are:
udev-090
hotplug-base-20040401
baselayout-1.12.0_pre19-r2
speedtouch-usb-3.0.1.2-r1 |
|
| Back to top |
|
 |
tane_stelzer Apprentice


Joined: 30 Dec 2005 Posts: 263 Location: Edinburgh, Scotland and Kempen, Germany
|
Posted: Tue Jun 13, 2006 3:39 am Post subject: |
|
|
Hi there,
i followed this HOWTO, and come upon an error. My modem doesn't seem to get recognised. The left LED is just flashing red the whole time and when i do /etc/init.d/internet(which is your script) I get the following output
| Code: | * Starting Internet connection...
* Checking interface... ... [ ok ]
* Checking line status... ...
cat: /proc/net/atm/speedtch:0: No such file or directory |
I hope someone can help me with this plz
Thanks a lot
Tane
EDIT:
Okay i checked my dmesg and the only output i get is
| Code: | | usbcore: registered new driver speedtch |
hope that helps with the problem and the red light is still flashing on the left _________________ Quick Quide to Linux Commands!
MINI HOWTO Get Planeshift working |
|
| Back to top |
|
 |
peka l33t


Joined: 16 Mar 2005 Posts: 773 Location: Płońsk, Poland
|
Posted: Tue Jun 13, 2006 5:14 am Post subject: |
|
|
Did you download the proper firmware and placed it right? _________________ p3k4
Seize the time, Meribor. Live now; make now always the most precious time. Now will never come again...
Jean-Luc Picard, Star Trek TNG - The Inner Light |
|
| Back to top |
|
 |
PaulBredbury Watchman


Joined: 14 Jul 2005 Posts: 7310
|
Posted: Tue Jun 13, 2006 8:35 am Post subject: |
|
|
| tane_stelzer wrote: | | when i do /etc/init.d/internet(which is your script) |
Exactly which script are you using? For SpeedTouch USB modems, emerge speedtouch-usb and read the README in /usr/share/doc/speedtouch-usb-<ver>. It does not mention "/etc/init.d/internet". |
|
| Back to top |
|
 |
tane_stelzer Apprentice


Joined: 30 Dec 2005 Posts: 263 Location: Edinburgh, Scotland and Kempen, Germany
|
Posted: Tue Jun 13, 2006 1:10 pm Post subject: |
|
|
i thought you dont have to emerge speedtouch-usb. I am pretty sure i got the right firmware, the 2 files are in /lib/firmware(can't remember their right names) The scipt i use it the one which is posted in the first post of this thread.
thanks for reply
Tane _________________ Quick Quide to Linux Commands!
MINI HOWTO Get Planeshift working |
|
| Back to top |
|
 |
PaulBredbury Watchman


Joined: 14 Jul 2005 Posts: 7310
|
Posted: Tue Jun 13, 2006 1:17 pm Post subject: |
|
|
| Make things easy for yourself - emerge the speedtouch-usb package. That's what it's for. |
|
| Back to top |
|
 |
|