Tell me more ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm using ubuntu 12.04 on amazon ec2, and I need to connect a pptp server after vps booted up, then run ip-up script to add iptables rules.

First I add my pptp config in /etc/network/interface like this:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

auto tunnel
iface tunnel inet ppp
        provider pptpprovider

But ip-up script is not executed.Here is syslog:

Aug  9 15:27:33 ec2 kernel: [    2.388709] init: udev-fallback-graphics main process (389) terminated with status 1
Aug  9 15:27:33 ec2 kernel: [    4.837053] PPP MPPE Compression module registered
Aug  9 15:27:33 ec2 kernel: [    4.953132] init: cloud-init-nonet main process (455) killed by TERM signal
Aug  9 15:27:33 ec2 kernel: [    5.117118] ip_tables: (C) 2000-2006 Netfilter Core Team
Aug  9 15:27:33 ec2 kernel: [    5.619809] init: failsafe main process (666) killed by TERM signal
Aug  9 15:27:33 ec2 kernel: [    5.923613] type=1400 audit(1344526053.099:8): apparmor="STATUS" operation="profile_replace" name="/sbin/dhclient" pid=731 comm="apparmor_parser"
Aug  9 15:27:33 ec2 kernel: [    5.955443] type=1400 audit(1344526053.135:9): apparmor="STATUS" operation="profile_replace" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=731 comm="apparmor_parser"
Aug  9 15:27:33 ec2 kernel: [    5.955642] type=1400 audit(1344526053.135:10): apparmor="STATUS" operation="profile_replace" name="/usr/lib/connman/scripts/dhclient-script" pid=731 comm="apparmor_parser"
Aug  9 15:27:33 ec2 kernel: [    5.965946] type=1400 audit(1344526053.143:11): apparmor="STATUS" operation="profile_load" name="/usr/sbin/tcpdump" pid=733 comm="apparmor_parser"
Aug  9 15:27:33 ec2 acpid: cannot open input layer
Aug  9 15:27:33 ec2 acpid: starting up with netlink and the input layer
Aug  9 15:27:33 ec2 cron[762]: (CRON) INFO (pidfile fd = 3)
Aug  9 15:27:33 ec2 cron[786]: (CRON) STARTUP (fork ok)
Aug  9 15:27:33 ec2 acpid: 1 rule loaded
Aug  9 15:27:33 ec2 acpid: waiting for events: event logging is off
Aug  9 15:27:33 ec2 cron[786]: (CRON) INFO (Running @reboot jobs)
Aug  9 15:27:37 ec2 ntpdate[445]: adjust time server 91.189.94.4 offset 0.211841 sec
Aug  9 15:27:39 ec2 collectd[898]: Initialization complete, entering read-loop.
Aug  9 15:27:39 ec2 kernel: [   12.221917] nf_conntrack version 0.5.0 (4721 buckets, 18884 max)
Aug  9 15:27:39 ec2 kernel: [   12.327906] init: plymouth-upstart-bridge main process (702) killed by TERM signal
Aug  9 15:27:39 ec2 kernel: [   12.672048] eth0: no IPv6 routers present
Aug  9 15:27:55 ec2 ntpdate[937]: adjust time server 91.189.94.4 offset 0.207243 sec
Aug  9 15:28:31 ec2 pptp[481]: anon log[logecho:pptp_ctrl.c:677]: Echo Reply received.
Aug  9 15:29:31 ec2 pptp[481]: anon log[logecho:pptp_ctrl.c:677]: Echo Reply received.
Aug  9 15:30:24 ec2 pptp[481]: anon log[callmgr_main:pptp_callmgr.c:258]: Closing connection (shutdown)
Aug  9 15:30:24 ec2 pptp[481]: anon log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 12 'Call-Clear-Request'
Aug  9 15:30:24 ec2 pptp[481]: anon log[call_callback:pptp_callmgr.c:79]: Closing connection (call state)
Aug  9 15:30:24 ec2 pppd[555]: Terminating on signal 15
Aug  9 15:30:24 ec2 pppd[555]: Modem hangup
Aug  9 15:30:24 ec2 pppd[555]: Connect time 2.9 minutes.
Aug  9 15:30:24 ec2 pppd[555]: Sent 0 bytes, received 0 bytes.
Aug  9 15:30:24 ec2 pppd[555]: MPPE disabled
Aug  9 15:30:24 ec2 pppd[555]: Connection terminated.
Aug  9 15:30:29 ec2 pppd[555]: Exit.

I manually shutdown the connection at 15:30:24. It seems like pptp connection is established before log system initialized.

Then I changed /etc/network/interface to:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp
    post-up pon pptpprovider

This time ip-up script been executed, but iptables is not initialized back then, and no rule been added. Here is syslog:

Aug  9 15:43:19 ec2 kernel: [    2.320727] init: udev-fallback-graphics main process (432) terminated with status 1
Aug  9 15:43:19 ec2 kernel: [    7.252901] init: cloud-init-nonet main process (446) killed by TERM signal
Aug  9 15:43:19 ec2 kernel: [    7.811454] init: failsafe main process (598) killed by TERM signal
Aug  9 15:43:19 ec2 kernel: [    8.042802] type=1400 audit(1344526999.912:5): apparmor="STATUS" operation="profile_replace" name="/sbin/dhclient" pid=661 comm="apparmor_parser"
Aug  9 15:43:19 ec2 kernel: [    8.048423] type=1400 audit(1344526999.920:6): apparmor="STATUS" operation="profile_replace" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=661 comm="apparmor_parser"
Aug  9 15:43:19 ec2 kernel: [    8.048618] type=1400 audit(1344526999.920:7): apparmor="STATUS" operation="profile_replace" name="/usr/lib/connman/scripts/dhclient-script" pid=661 comm="apparmor_parser"
Aug  9 15:43:19 ec2 kernel: [    8.091678] type=1400 audit(1344526999.960:8): apparmor="STATUS" operation="profile_load" name="/usr/sbin/tcpdump" pid=663 comm="apparmor_parser"
Aug  9 15:43:20 ec2 pptp[534]: anon log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 7 'Outgoing-Call-Request'
Aug  9 15:43:20 ec2 pptp[534]: anon log[ctrlp_disp:pptp_ctrl.c:858]: Received Outgoing Call Reply.
Aug  9 15:43:20 ec2 pptp[534]: anon log[ctrlp_disp:pptp_ctrl.c:897]: Outgoing call established (call ID 0, peer's call ID 41600).
Aug  9 15:43:20 ec2 pppd[510]: CHAP authentication succeeded
Aug  9 15:43:20 ec2 kernel: [    8.349604] PPP MPPE Compression module registered
Aug  9 15:43:20 ec2 acpid: cannot open input layer
Aug  9 15:43:20 ec2 acpid: starting up with netlink and the input layer
Aug  9 15:43:20 ec2 cron[698]: (CRON) INFO (pidfile fd = 3)
Aug  9 15:43:20 ec2 acpid: 1 rule loaded
Aug  9 15:43:20 ec2 acpid: waiting for events: event logging is off
Aug  9 15:43:20 ec2 cron[731]: (CRON) STARTUP (fork ok)
Aug  9 15:43:20 ec2 pppd[510]: MPPE 128-bit stateless compression enabled
Aug  9 15:43:20 ec2 cron[731]: (CRON) INFO (Running @reboot jobs)
Aug  9 15:43:20 ec2 pppd[510]: local  IP address 10.0.0.10
Aug  9 15:43:20 ec2 pppd[510]: remote IP address 10.0.0.1
Aug  9 15:43:20 ec2 kernel: [    8.611567] ip_tables: (C) 2000-2006 Netfilter Core Team
Aug  9 15:43:20 ec2 collectd[881]: Initialization complete, entering read-loop.
Aug  9 15:43:20 ec2 kernel: [    8.923653] nf_conntrack version 0.5.0 (4721 buckets, 18884 max)
Aug  9 15:43:20 ec2 kernel: [    9.007625] init: plymouth-upstart-bridge main process (624) killed by TERM signal
Aug  9 15:43:23 ec2 kernel: [   11.920027] eth0: no IPv6 routers present

Is there anyway to delay interface setup in /etc/network/interface to ensure all needed modules are loaded?

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.