 |
 |
 |
 |
| Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc. |

8th September 2012, 12:27 PM
|
|
Registered User
|
|
Join Date: Aug 2012
Location: Serbia
Posts: 24

|
|
|
Autostart pppoe on boot? (using /sbin/ifup)
Got pppoe up and working using this script...
Code:
[root@l300 ~]# pppoe-setup
Welcome to the PPPoE client setup. First, I will run some checks on
your system to make sure the PPPoE client is installed properly...
The following DSL config was found on your system:
Device: Name:
ppp0 DSLppp0
Please enter the device if you want to configure the present DSL config
(default ppp0) or enter 'n' if you want to create a new one: ppp0
LOGIN NAME
Enter your Login Name (default bozha): bozha
INTERFACE
Enter the Ethernet interface connected to the PPPoE modem
For Solaris, this is likely to be something like /dev/hme0.
For Linux, it will be ethX, where 'X' is a number.
(default wlan1): wlan1
Do you want the link to come up on demand, or stay up continuously?
If you want it to come up on demand, enter the idle time in seconds
after which the link should be dropped. If you want the link to
stay up permanently, enter 'no' (two letters, lower-case.)
NOTE: Demand-activated links do not interact well with dynamic IP
addresses. You may have some problems with demand-activated links.
Enter the demand value (default no): no
DNS
Please enter the IP address of your ISP's primary DNS server.
If your ISP claims that 'the server will provide dynamic DNS addresses',
enter 'server' (all lower-case) here.
If you just press enter, I will assume you know what you are
doing and not modify your DNS setup.
Enter the DNS information here: server
PASSWORD
Please enter your Password:
Please re-enter your Password:
USERCTRL
Please enter 'yes' (three letters, lower-case.) if you want to allow
normal user to start or stop DSL connection (default yes): yes
FIREWALLING
Please choose the firewall rules to use. Note that these rules are
very basic. You are strongly encouraged to use a more sophisticated
firewall setup; however, these will provide basic security. If you
are running any servers on your machine, you must choose 'NONE' and
set up firewalling yourself. Otherwise, the firewall rules will deny
access to all standard servers like Web, e-mail, ftp, etc. If you
are using SSH, the rules will block outgoing SSH connections which
allocate a privileged source port.
The firewall choices are:
0 - NONE: This script will not set any firewall rules. You are responsible
for ensuring the security of your machine. You are STRONGLY
recommended to use some kind of firewall rules.
1 - STANDALONE: Appropriate for a basic stand-alone web-surfing workstation
2 - MASQUERADE: Appropriate for a machine acting as an Internet gateway
for a LAN
Choose a type of firewall (0-2): 1
Start this connection at boot time
Do you want to start this connection at boot time?
Please enter no or yes (default no):yes
** Summary of what you entered **
Ethernet Interface: wlan1
User name: bozha
Activate-on-demand: No
DNS addresses: Supplied by ISP's server
Firewalling: STANDALONE
User Control: yes
Accept these settings and adjust configuration files (y/n)? y
Adjusting /etc/sysconfig/network-scripts/ifcfg-ppp0
Adjusting /etc/ppp/chap-secrets and /etc/ppp/pap-secrets
(But first backing it up to /etc/ppp/chap-secrets.bak)
(But first backing it up to /etc/ppp/pap-secrets.bak)
Congratulations, it should be all set up!
Type '/sbin/ifup ppp0' to bring up your xDSL link and '/sbin/ifdown ppp0'
to bring it down.
Type '/sbin/pppoe-status /etc/sysconfig/network-scripts/ifcfg-ppp0'
to see the link status.
.. but it wont start automatically after reboot, and when I run it through the Terminal with “/sbin/ifup ppp0” it demands root privileges. Shouldn't that be set with bolded parts of the code? Any sugestions how to fix the problem?
|

8th September 2012, 02:55 PM
|
 |
"Registered User" T-Shirt Winner
|
|
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,118

|
|
|
Re: Autostart pppoe on boot? (using /sbin/ifup)
I would suggest looking at the configuration file created for that network device:
/etc/sysconfig/network-scripts/ifcfg-some_name
And checking for lines:
ONBOOT=yes
USERCTL=yes
Edit the file to add/modify those lines if they don't exist or say "no".
|

9th September 2012, 02:26 AM
|
|
Registered User
|
|
Join Date: Aug 2012
Location: Serbia
Posts: 24

|
|
|
Re: Autostart pppoe on boot? (using /sbin/ifup)
But if both lines exist, and say "YES"?
|

9th September 2012, 02:49 AM
|
 |
"Registered User" T-Shirt Winner
|
|
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,118

|
|
|
Re: Autostart pppoe on boot? (using /sbin/ifup)
In that case, and it's not working, then I don't know what else to suggest other than to create the file, if it doesn't already exist:
/etc/rc.d/rc.local
and put in that file:
Code:
#!/bin/bash
# Add commands to run at system startup
/sbin/ifup ppp0
This will run as root at bootup. I believe by default, the rc-local.service should be running. If not, enable it.
|

9th September 2012, 01:30 PM
|
|
Registered User
|
|
Join Date: Aug 2012
Location: Serbia
Posts: 24

|
|
|
Re: Autostart pppoe on boot? (using /sbin/ifup)
Creating /etc/rc.d/rc.local makes no change. Trying to enable rc-local.service result with this...
Code:
[root@l300 ~]# systemctl enable rc-local.service
The unit files have no [Install] section. They are not meant to be enabled using systemctl.
---------- Post added at 02:30 PM ---------- Previous post was at 10:46 AM ----------
Found it!
/etc/rc.d/rc.local has to be executable, so...
Code:
chmod +x /etc/rc.d/rc.local
... finaly fix it!
Thanks for help!
|

9th September 2012, 02:05 PM
|
 |
"Registered User" T-Shirt Winner
|
|
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,118

|
|
|
Re: Autostart pppoe on boot? (using /sbin/ifup)
Glad that worked for you, and my apologies for not thinking to mention that the rc.local file, which is a shell script, needs to be set executable.
|

9th September 2012, 06:00 PM
|
|
Registered User
|
|
Join Date: Aug 2012
Location: Serbia
Posts: 24

|
|
|
Re: Autostart pppoe on boot? (using /sbin/ifup)
Well, this is just getting weird... I'm connected right after boot, pppoe is up and running with valid IP, butt can't get anything from internet.
Then I run Terminal as root, manually disconnect it (/sbin/ifdown ppp0), then connect again (/sbin/ifup ppp0), get the same status, same IP... and there it is, internet is working.
Some mess with the user privileges possibly? :/
Last edited by Bozha; 9th September 2012 at 06:07 PM.
|

9th September 2012, 10:26 PM
|
 |
"Registered User" T-Shirt Winner
|
|
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,118

|
|
|
Re: Autostart pppoe on boot? (using /sbin/ifup)
You might want to mention which release of Fedora you're using, and if NetworkManager is active and running at bootup or not. Are you even booting into a GUI, or just booting into runlevel 3 console mode? I suppose, since you'e posting here from a browser, you're booting into graphical mode. I don't think it's a permissions issue, but maybe a NetworkManager timing issue. Does NetworkManager claim "control" over this network device?
Last edited by PabloTwo; 9th September 2012 at 10:29 PM.
|

10th September 2012, 12:36 AM
|
|
Registered User
|
|
Join Date: Aug 2012
Location: Serbia
Posts: 24

|
|
|
Re: Autostart pppoe on boot? (using /sbin/ifup)
Of course... I'm using Fedora 17 with GUI. NetworkManager is up and running, and here is it's status:
Code:
NetworkManager.service - Network Manager
Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled)
Active: active (running) since Mon, 10 Sep 2012 01:31:14 +0200; 1min 2s ago
Main PID: 726 (NetworkManager)
CGroup: name=systemd:/system/NetworkManager.service
├ 726 /usr/sbin/NetworkManager --no-daemon
├ 902 avahi-autoipd: [wlan1] bound 169.254.13.38
└ 904 avahi-autoipd: [wlan1] callout dispatcher
Sep 10 01:31:21 l300.localdomain NetworkManager[726]: <info> Activation (wlan1) Beginning IP6 addrconf.
Sep 10 01:31:21 l300.localdomain NetworkManager[726]: <info> Activation (wlan1) Stage 3 of 5 (IP Configure Start) complete.
Sep 10 01:31:21 l300.localdomain NetworkManager[726]: <info> Activation (wlan1) Stage 5 of 5 (IPv6 Commit) scheduled...
Sep 10 01:31:21 l300.localdomain NetworkManager[726]: <info> Activation (wlan1) Stage 5 of 5 (IPv6 Commit) started...
Sep 10 01:31:22 l300.localdomain NetworkManager[726]: <info> (wlan1): device state change: ip-config -> activated (reason 'none') [70 100 0]
Sep 10 01:31:22 l300.localdomain NetworkManager[726]: <info> Activation (wlan1) successful, device activated.
Sep 10 01:31:22 l300.localdomain NetworkManager[726]: <info> Activation (wlan1) Stage 5 of 5 (IPv6 Commit) complete.
Sep 10 01:31:26 l300.localdomain NetworkManager[726]: <info> Activation (wlan1) Stage 5 of 5 (IPv4 Configure Commit) scheduled...
Sep 10 01:31:26 l300.localdomain NetworkManager[726]: <info> Activation (wlan1) Stage 5 of 5 (IPv4 Commit) started...
Sep 10 01:31:27 l300.localdomain NetworkManager[726]: <info> Activation (wlan1) Stage 5 of 5 (IPv4 Commit) complete.
|

10th September 2012, 12:57 AM
|
 |
"Registered User" T-Shirt Winner
|
|
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,118

|
|
|
Re: Autostart pppoe on boot? (using /sbin/ifup)
Then I would think that NetworkManager would just auto-start your wlan1 network device at boot-up, without any assist from the rc.local file. Have you right-clicked on the NM applet icon and gone through the settings there for you network connection?
|

11th September 2012, 07:15 AM
|
|
Registered User
|
|
Join Date: Aug 2012
Location: Serbia
Posts: 24

|
|
|
Re: Autostart pppoe on boot? (using /sbin/ifup)
Network settings>Wireless>Options, checked Connect automatically and Available to all users, in IPv4 and IPv6 tabs Method is switched to Link-Local Only. All of these seems to work fine, even later PPPoE settings are working. It is autoconnected and does have right IP address... But somehow, network trafic is blocked... Firewall?
|

11th September 2012, 07:32 AM
|
 |
Registered User
|
|
Join Date: Oct 2006
Location: Singapore, 新加坡
Posts: 733

|
|
|
Re: Autostart pppoe on boot? (using /sbin/ifup)
Can you post your ifcfg-ppp0 here? Beside the ONBOOT="yes", does it also have the NM_CONTROLLED="yes" line?
__________________
YaoWT - Leave no window unbroken ^_^
|

11th September 2012, 08:11 AM
|
|
Registered User
|
|
Join Date: Aug 2012
Location: Serbia
Posts: 24

|
|
|
Re: Autostart pppoe on boot? (using /sbin/ifup)
Here it is...
Code:
USERCTL=yes
BOOTPROTO=dialup
NAME=DSLppp0
DEVICE=ppp0
TYPE=xDSL
ONBOOT=yes
PIDFILE=/var/run/pppoe-adsl.pid
FIREWALL=STANDALONE
PING=.
PPPOE_TIMEOUT=80
LCP_FAILURE=3
LCP_INTERVAL=20
CLAMPMSS=1412
CONNECT_POLL=6
CONNECT_TIMEOUT=60
DEFROUTE=yes
SYNCHRONOUS=no
ETH=wlan1
PROVIDER=DSLppp0
USER=bozha
PEERDNS=yes
DEMAND=no
No such line here...
|

11th September 2012, 09:49 AM
|
 |
Registered User
|
|
Join Date: Oct 2006
Location: Singapore, 新加坡
Posts: 733

|
|
|
Re: Autostart pppoe on boot? (using /sbin/ifup)
No promise. May be it worth a try to add this line in and then reboot and login again to see NM would auto bring the interface up.
__________________
YaoWT - Leave no window unbroken ^_^
|

11th September 2012, 11:34 AM
|
|
Registered User
|
|
Join Date: Aug 2012
Location: Serbia
Posts: 24

|
|
|
Re: Autostart pppoe on boot? (using /sbin/ifup)
Try that already... No improvement...
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 18:50 (Saturday, 18-05-2013)
|
|
 |
 |
 |
 |
|
|