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

    Routing 169.254 Networks

    Scheduled Pinned Locked Moved Routing and Multi WAN
    24 Posts 2 Posters 5.3k 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.
    • H
      hopkins
      last edited by

      There is of course a FW after the GW, which doesn't made the devices directly expose to the internet. Opening a port to the internet requires some kind of commercial HIDS agents installed on the machines (and exhaustive paperwork too!).

      For that outbound NAT Rule to the VIP, I need to create the VIP with the address 169.254.x.x, right? Is it possible to create one in 192.168.1.x range (and outside DHCP range too) so that my Linux machines doesn't need to setup a route specifically for eth0?

      I was hoping there is a "virtual host" on 192.168.1.x which redirect traffics to it to the printer at 169.254.169.233.

      Thanks.

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

        You could create a port forward, but your still going to need the 169.254 vip on the wan.

        You understand all these problems would go away if they would just give the printer a 189.237 IP.. Why do they not give the printer an IP on the network its sitting on?

        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
        • H
          hopkins
          last edited by hopkins

          Of course everything would be fine if the printer got an IP address on 189.237.xxx.xxx, but due to limited IP address space we own, they seems to think having a dedicated IP for a printer in a small office is a wasteful of resources. Plus the fact that no other colleagues had issues with current setup on Windows (only me because I need my PF Box).

          I tried adding 169.254.169.233 as IP alias VIP, but it messed up my route in my PF Box.

          My original config is adding the route at system boot, which is quite hacky IMO:
          (Adding in "shellcmd" in "system" stanza of /conf/config.xml) (Have to put in this way or will flagged as spam by the forum's spam detection engine "flagged as spam by Akismet.com")

          route add -net 169.254.169.233/32 -interface re0
          

          which result in the following routes (netstat -rn)

          169.254.169.233/32   <re0's MAC Address>  US          re0
          

          When added the VIP, the route became as follows:

          169.254.169.233      link#1             UHS         lo0
          169.254.169.233/32   link#1             U           re0
          

          Pining 169.254.169.233 always pinging the local machine (the PF Box itself).

          Should I remove the floating IP too?

          Any ideas?

          Thanks.

          H johnpozJ 2 Replies Last reply Reply Quote 0
          • H
            hopkins @hopkins
            last edited by

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • johnpozJ
              johnpoz LAYER 8 Global Moderator @hopkins
              last edited by johnpoz

              @hopkins said in Routing 169.254 Networks:

              but due to limited IP address space we own, they seems to think having a dedicated IP for a printer in a small office is a wasteful of resources.

              Then put your printer on a rfc1918 and put it on its own segment and route... JFC some people shouldn't be allowed to touch a network. Or for that matter give it a rfc1918 address and now you could just run the multiple layer 3 on the same layer 2.. Vs using IP space this is not routable.

              If they are limited with their space they own - then don't freaking use it internally then.. The whole F'ing point to rfc1918 space!!

              If you give your interface a vip on that 169.254 network, you would not need to create a route... Just create a port forward using your lan interface and using your vip as the nat.

              If I get a chance I will duplicate this moronic setup and post screenshots how to do it.

              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
              • johnpozJ
                johnpoz LAYER 8 Global Moderator
                last edited by

                Ok: So I didn't forget about this... But didn't get to it last night. And wife still sleeping so didn't want to fire up the laser printer because it makes a bit of noise.. But I did get my wan L2 running through my switch - so I can no easy add anything to that L2 I want and duplicate your 169.254 nonsense on my 64.53.x.x public wan.

                When I get back from walk will connect something with 169.254 and then try and access it from my lan behind pfsense.

                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
                • johnpozJ
                  johnpoz LAYER 8 Global Moderator
                  last edited by johnpoz

                  Ok here you go - sorry for the delay... When got back from walk yesterday I got side tracked on other things then had to leave for work.

                  Set my printer to 169.254.2.50, connected it to my wan L2

                  setup.png

                  Created a vip on my pfsense 169.254.100.100
                  169vip.png

                  Made sure pfsense could ping it
                  pfs-ping169.png

                  Created outbound nat rule
                  outboundnat.png

                  Created a port forward for ping to some odd rfc1918 IP that would send to 169.254.100.100 - you will need whatever port(s) your using for printing.
                  portforward.png

                  Then from my PC I pinged the portforwarded IP 192.168.20.50 in my case - and via sniff on wan while this is happening you see that pfsense changed that to its 169.254.100.100 address
                  ping-sniff.png

                  Make sure you turn off blocking APIPA
                  JimP has a post here about it
                  https://forum.netgate.com/post/737766

                  Validate that is working by looking at your full rule set or looking in your system of your config - download that section via backup and look at it with fav text editor..

                  allowAPIPAroute.png

                  Good Luck - but you really should get with your IT to do this correctly!!! Such a setup is just plain BORKED!!!

                  edit: To to be 100% complete on this - check your full rules
                  pfctl -sr
                  If you see

                  block drop in quick inet from 169.254.0.0/16 to any label "Block IPv4 link-local"
                  block drop in quick inet from any to 169.254.0.0/16 label "Block IPv4 link-local"
                  

                  In there which is the default then no its not going to work.. Check the above setting in your <system> part of the config and do your filter reload, then check your rules again.

                  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 1
                  • H
                    hopkins
                    last edited by

                    Thanks! It was very kind of you to post the steps and screenshots.
                    It is working and I can finally connect to my printer now!

                    I really appreciate for your help :)

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

                      Yeah never know when the next guy will have the same question ;)

                      Glad you got is sorted - but its still BORKED!!! dude.. Your IT guys need to rethink how they have their printer setup.. That is just nonsense to have to have users create route statements, 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
                      • H
                        hopkins
                        last edited by

                        To be fair, I don't think they will do anything about it though. Regardless the network is borked or not, they won't modify the network settings for the one single guy who wants more security with a PF box. Especially when other (Windows) users doesn't have any issues.

                        Funny thing is, the printer seems automatically change its IP every few days, I guess I have to live with it and use IP Aliases..ha!

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

                          APIPA (169.254.x.x) is what is used when device is set for dhcp and it gets no dhcp, so yeah it could change whenever it tries to get dhcp again, or when its rebooted for sure, etc..

                          You would think they could take the time to actually just set a rfc1918 IP on the freaking thing - so its always the same IP..

                          You sure they even understand what its doing?

                          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
                          • H
                            hopkins
                            last edited by hopkins

                            I am not sure. But if the printer gets a RFC1918 IP (e.g. 192.168.x.x), I think it requires more configurations for my colleagues' Windows PCs, which means they (the IT guys) need to do more things, which means it is better to leave the network configuration to status quo. I don't think they really care if the network is f*'d up or not, as long as it works...

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

                              No it would require the same sort of shit nonsense with a route statement..

                              But it wouldn't be freaking changing as the wind blows.

                              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
                              • H
                                hopkins
                                last edited by

                                Hmm... I will try to talk to the IT guys later if possible.
                                In the meantime I think I probably will need to stick to current configurations.
                                Thanks again for your help. You really did save the day!

                                1 Reply Last reply Reply Quote 0
                                • H
                                  hopkins
                                  last edited by hopkins

                                  Sorry for bumping up the old post.
                                  After upgrading to 2.4.5, I cannot reach the printer anymore.

                                  It seems that I can ping it on the pfsense box, but not on the NAT IP on LAN.
                                  55518a03-4cc3-4b6e-b6c8-21e362edfc78-image.png

                                  6a44caf2-e736-4eda-b2b0-0e267eb3cc58-image.png

                                  When pinging 192.168.200.1 (Printer is at 169.254.169.100, VIP of my box is 169.254.100.100/16) from 192.168.1.4:
                                  0afe829e-46a5-4bb2-b437-10da5d265ae2-image.png

                                  It seems that there is no response:
                                  4c79ce4b-a5a6-46cd-8157-cfced18e3a1f-image.png

                                  I have confirmed that no_apipa_block is set to true, and

                                  pfctl -sr
                                  

                                  shows no blockage for packets in 169.254.0.0/16

                                  Any ideas what is going on?

                                  Thanks

                                  H 1 Reply Last reply Reply Quote 0
                                  • H
                                    hopkins @hopkins
                                    last edited by

                                    @hopkins Got similar issue for users upgraded to 2.4.5, not sure if it helps to diagnostic the issue:
                                    https://www.reddit.com/r/PFSENSE/comments/fq8t8f/245_breaks_apipanat_rules_for_me/

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

                                      And clearly that redmine was rejected..

                                      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
                                      • johnpozJ
                                        johnpoz LAYER 8 Global Moderator
                                        last edited by

                                        @hopkins said in Routing 169.254 Networks:

                                        shows no blockage for packets in 169.254.0.0/16

                                        To talk to something on another vlan that is using apipa, that device would have to have a gateway.. Or you would have to nat to it, 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
                                        • First post
                                          Last post
                                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.