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

    Set Static Arp Entry [NOTHING TO DO WITH LAN OR DHCP SERVER]

    Scheduled Pinned Locked Moved General pfSense Questions
    19 Posts 3 Posters 6.8k 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.
    • johnpozJ
      johnpoz LAYER 8 Global Moderator
      last edited by johnpoz

      You need to delete the bad entry then add a good entry with your arp command..

      Use the big S vs the little s

      Here I just overwrote my printers arp entry with mac of your Bad Guy.

      [2.4.4-RELEASE][root@sg4860.local.lan]/root: arp -a | grep 192.168.2.50
      BRN30055C116AD9.local (192.168.2.50) at 30:05:5c:11:6a:d9 on igb2 expires in 1023 seconds [ethernet]
      [2.4.4-RELEASE][root@sg4860.local.lan]/root: arp -S 192.168.2.50 08:02:8E:7A:13:52
      192.168.2.50 (192.168.2.50) deleted
      [2.4.4-RELEASE][root@sg4860.local.lan]/root: arp -a | grep 192.168.2.50
      BRN30055C116AD9.local (192.168.2.50) at 08:02:8e:7a:13:52 on igb2 permanent [ethernet]
      [2.4.4-RELEASE][root@sg4860.local.lan]/root: 
      

      Now I deleted it, and its back to normal

      [2.4.4-RELEASE][root@sg4860.local.lan]/root: arp -d 192.168.2.50
      192.168.2.50 (192.168.2.50) deleted
      [2.4.4-RELEASE][root@sg4860.local.lan]/root: ping 192.168.2.50
      PING 192.168.2.50 (192.168.2.50): 56 data bytes
      64 bytes from 192.168.2.50: icmp_seq=0 ttl=255 time=2.049 ms
      64 bytes from 192.168.2.50: icmp_seq=1 ttl=255 time=1.333 ms
      ^C
      --- 192.168.2.50 ping statistics ---
      2 packets transmitted, 2 packets received, 0.0% packet loss
      round-trip min/avg/max/stddev = 1.333/1.691/2.049/0.358 ms
      [2.4.4-RELEASE][root@sg4860.local.lan]/root: arp -a | grep 192.168.2.50
      BRN30055C116AD9.local (192.168.2.50) at 30:05:5c:11:6a:d9 on igb2 expires in 1193 seconds [ethernet]
      [2.4.4-RELEASE][root@sg4860.local.lan]/root: 
      

      Why would they go door to door, they are using dumb switches?? OMG!!! ;) The cheapest of cheapest "smart" switches would allow them from their desks to track down the bad mac port connection and then just turn off the port..

      Oh you did you -S, Ah!!! your not root your admin... You would need to be root on your pfsense to do that command.. Why does your cmd line say admin vs root? If you ssh in with admin you get root..

      Odd... But lets see your ifconfig... You shouldn't be getting that error if your actually connected to that 192.168 network.

      See just tried creating arp entry for network not attached too.

      [2.4.4-RELEASE][root@sg4860.local.lan]/root: arp -S 192.168.20.50 08:02:8E:7A:13:52
      arp: writing to routing socket: No such file or directory
      arp: cannot intuit interface index and type for 192.168.20.50
      [2.4.4-RELEASE][root@sg4860.local.lan]/root: 
      

      I don't have a 192.168.20 network.

      Also what version of pfsense are you on - you should be getting the same error, etc. it says are you 2.4.4p2? Not sure why yours would not given you the exact info like mine did about non network and sad something about process..

      If you ssh in as admin you get root prompt as well - so why/how are you seeing admin prompt?

      An intelligent man is sometimes forced to be drunk to spend time with his fools
      If you get confused: Listen to the Music Play
      Please don't Chat/PM me for help, unless mod related
      SG-4860 24.11 | Lab VMs 2.8, 24.11

      1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        Mmm, I tested that as admin before and it works OK. And still works for me:

        [2.4.5-DEVELOPMENT][admin@2220.stevew.lan]/root: arp -S 172.21.16.48 30:05:5c:11:6a:d9
        172.21.16.48 (172.21.16.48) deleted
        

        The error you're seeing seemed mostly due to a subnet mash error on an interface. Can we see the output of ifconfig -a ?

        Steve

        1 Reply Last reply Reply Quote 0
        • johnpozJ
          johnpoz LAYER 8 Global Moderator
          last edited by

          @stephenw10 how exactly are you getting admin prompt vs root prompt? If I ssh to pfsense as "admin" I still end up at root prompt, etc.

          An intelligent man is sometimes forced to be drunk to spend time with his fools
          If you get confused: Listen to the Music Play
          Please don't Chat/PM me for help, unless mod related
          SG-4860 24.11 | Lab VMs 2.8, 24.11

          1 Reply Last reply Reply Quote 0
          • stephenw10S
            stephenw10 Netgate Administrator
            last edited by

            Not sure why you're seeing that. I always see admin@ if I login as admin@.

            Admin and root are pretty much the same thing in pfSense anyway though. I wouldn't expect it to make a difference here.

            The only time that applies is when connecting via sftp where root is required to avoid the menu AFAIK.

            Steve

            1 Reply Last reply Reply Quote 0
            • johnpozJ
              johnpoz LAYER 8 Global Moderator
              last edited by johnpoz

              Nevermind - I wasn't looking at the prompt after I changed the name in securecrt, just the dir - DOH! ;)

              When I change account to admin, the account is admin - just the home dir is /root

              [2.4.4-RELEASE][admin@sg4860.local.lan]/root:
              

              But yeah agree the same account really.

              Yeah like to see the ifconfig output to see what the mask is on his 192.168 address - but if he wan is 192.168.0.x not sure how mask could be wrong that he could not create a static arp for a 192.168.0.1 address? Maybe he is at something like 192.168.X and thinks it in a 192.168.0/16?? When its really not at that mask??

              An intelligent man is sometimes forced to be drunk to spend time with his fools
              If you get confused: Listen to the Music Play
              Please don't Chat/PM me for help, unless mod related
              SG-4860 24.11 | Lab VMs 2.8, 24.11

              SgtKilgore406S 1 Reply Last reply Reply Quote 0
              • SgtKilgore406S
                SgtKilgore406 @johnpoz
                last edited by

                @johnpoz
                @stephenw10

                Hmm, not sure exactly what happened but I was able to run the arp command and this time it took.
                0_1551921977100_Screen Shot 2019-03-06 at 6.25.51 PM.png

                As of now I am typing this using my pfSense box for my connection to this forum. At this point what I am going to attempt to do now is configure that ARP command to automatically run at boot.

                @stephenw10 said in Set Static Arp Entry [NOTHING TO DO WITH LAN OR DHCP SERVER]:

                The only issue you might have is if you disconnect the WAN without rebooting it may lose the static entry.

                Steve

                So if I happen to lose the upstream link then the static entry could disappear? I have the pfSense box connected to my 1500VA UPS but I know the college doesn't have their switch on a UPS.

                Would it be possible to have the ARP command dynamically run if the link is lost and come back with a script?

                1 Reply Last reply Reply Quote 0
                • johnpozJ
                  johnpoz LAYER 8 Global Moderator
                  last edited by

                  Lets go over this again.. Setting static arp for because some dickhead is stepping on your gateway is NOT the correct fix..

                  That your IT support is so pathetic that they can not even stop some idiot from stepping on their IP on the "their" network is beyond laughable!!! Please point them to thread I would love to talk to this freaking idiots that should be flipping burgers vs saying they are in the tech field. ;)

                  Is this some school where they teach you how to basket weave or how you "feel" when billy calls you stupid.. Or maybe its a schools about "god"??

                  They clearly can not even run the most basic of networks.. I feel your pain I do.. But that you give such a school even a 1$ when they can not even do the most basic of networking maint.. WTF!!!

                  An intelligent man is sometimes forced to be drunk to spend time with his fools
                  If you get confused: Listen to the Music Play
                  Please don't Chat/PM me for help, unless mod related
                  SG-4860 24.11 | Lab VMs 2.8, 24.11

                  1 Reply Last reply Reply Quote 0
                  • SgtKilgore406S
                    SgtKilgore406
                    last edited by

                    Again, I am fully aware that doing this "fix" is not what you should do. They are idiots, not worth my breath to argue with, and I am about to graduate this year so it isn't important enough to push it for me.

                    Yes, they are pathetic. Guess what? They didn't even build their own network, it was done by a 3rd party contractor. Guess what, they don't even have spanning tree enabled so loops are more common than they should be. Their DNS servers are jacked up so that you can't reach their own hosted sites without VPNing out [ask me how I know that one ;)]. The WiFi drops outs, and beyond the IT degree program faculty who actually know way more, everyone else at the college is oblivious.

                    It is a small tribal community college about an hour from my home so they are not really focused about technology per say. I am the only senior in the IT program and the classes below me are all >10 students. There are larger colleges and universities nearby but I did not want to pay the exorbitant cost that they would demand. It's hard to describe but I do like being here, if anything because my instructors are awesome and know what they are talking about.

                    @johnpoz said in Set Static Arp Entry [NOTHING TO DO WITH LAN OR DHCP SERVER]:

                    Is this some school where they teach you how to basket weave or how you "feel" when billy calls you stupid..

                    Yeah, you could say that. :D

                    1 Reply Last reply Reply Quote 1
                    • johnpozJ
                      johnpoz LAYER 8 Global Moderator
                      last edited by johnpoz

                      hahaha dude that is great!

                      But if you set static arp - it should survive reboot.. So you should be good.. I have not personally tested it on freebsd/pfsense since have not ever needed to set a static like your doing..

                      But over the years that has been common.. once you set static, its set..

                      But sure you could use a cron or something to set it..

                      Before you leave can we F with these idiots!!! Please oh Please bring them into this thread!!!

                      edit: See my PM.. Dude that has got to be one of the best responses around here in years.. Love it!!! Please stick around.. you seem like the kind of people I love to help!!!

                      edit2: Lets hook up this school with some training from pfsense???? Seems like they could use some real help!! I will reach out to the guys here... Maybe we can "fix" this school tech... I think it might be a huge PR thing for netgate.. Will ask about it on private channels.

                      edit3: Keep in mind that is just me talking (I do not in anyway speak for netgate/pfsense)... But I like the idea...I would volunteer my time if this school was close to chicagoland on a weekend..

                      An intelligent man is sometimes forced to be drunk to spend time with his fools
                      If you get confused: Listen to the Music Play
                      Please don't Chat/PM me for help, unless mod related
                      SG-4860 24.11 | Lab VMs 2.8, 24.11

                      1 Reply Last reply Reply Quote 0
                      • stephenw10S
                        stephenw10 Netgate Administrator
                        last edited by

                        If you do need to apply that command at boot you can do so with a shellcmd:
                        https://docs.netgate.com/pfsense/en/latest/development/executing-commands-at-boot-time.html

                        And actually now I think about it if you use the 'afterfilerchnages' type there it will be applied if the WAN goes down and comes back up. That might be all you need there.

                        Steve

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