Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Help on disconnect and reconnect a PPPOE connection by Command Line

    Scheduled Pinned Locked Moved General pfSense Questions
    5 Posts 4 Posters 4.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      cnjimmyshao
      last edited by

      Hi, need your help, question as below:

      I need manually disconnect and reconnect a PPPOE connection from time to time.
      I know it could be done though GUI (status/interfaces), however, can I do it though command line?

      I tried "ifconfig interface down", it dosn't reconnect the PPPOE, it just simply block the communication.
      When I use "ifconfig interface up", the PPPOE connection remains, it never disconnect and reconnect.

      So, any command I should use to achieve the disconnect/reconnect PPPOE?

      Thanks !

      1 Reply Last reply Reply Quote 0
      • F
        firewalluser
        last edited by

        2 min google search threw this up which might be useful.

        https://forums.freebsd.org/threads/how-to-restart-a-single-network-interface-properly.22494/
        https://www.freebsd.org/doc/handbook/config-network-setup.html

        Capitalism, currently The World's best Entertainment Control System and YOU cant buy it! But you can buy this, or some of this or some of these

        Asch Conformity, mainly the blind leading the blind.

        1 Reply Last reply Reply Quote 0
        • GertjanG
          Gertjan
          last edited by

          Even faster !

          Look carefully here https://forum.pfsense.org/index.php?board=44.0 (the forum where you posted your message)
          You will find this https://forum.pfsense.org/index.php?topic=81793.0

          No "help me" PM's please. Use the forum, the community will thank you.
          Edit : and where are the logs ??

          1 Reply Last reply Reply Quote 0
          • C
            cmb
            last edited by

            You can reconnect PPPoE using this script:

            #!/bin/sh
            
            # Command to reload wan interface
            /usr/local/sbin/pfSctl -c 'interface reload wan' >/dev/null 2>&1 || exit 1
            
            # Command to log this event
            /usr/bin/logger -t ppp "PPPoE reset executed on WAN" 
            
            exit 0
            

            Replacing "wan" with "opt1" or other interface identifier as needed. Which Armin shared in this ticket.

            1 Reply Last reply Reply Quote 0
            • C
              cmb
              last edited by

              Saw your post over on that other project's forum. PPPoE multi-WAN with the same gateway IP has worked in pfSense for quite some time, that only works in OPNsense because we fixed it years back (the only thing they've actually accomplished functionality-wise is breaking things that worked in the code they forked). I'm guessing you found some really old references that are no longer applicable. Maybe you have an unusual edge case, which if that's the case, please start a new thread describing what you're doing. Multiple PPPoE with the same gateway most definitely works though.

              With pfSense, when you boot up, your rules are actually loaded correctly, unlike some other projects. And our reply-to actually functions, unlike some others (that bug should really be labeled as "multi-WAN is non-functional for all inbound traffic"). Multi-WAN IPsec works, unlike some others. I could go on. Suffice it to say, you're in for a world of hurt if you continue down that path. They've broken a lot of key multi-WAN things where you won't have those issues here.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.