Network Problem(there is no default ip , and can't able to assign permanent ip)



  • Hi All,

    I am very new to pfsense and freebsd, recently started working with pfsense. I installed pfsence (connected to other system through lan for interface). Installation was done. But after rebooting the system is not having any default ip like 192.168.1.1.

    manually assigned the ip with the following command

    #ipconfig bge1 192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255

    then I got the connection with to interface from other system which connected to this pfsense machine

    but if I do any changes from the interface or  restart the network in pfsense using

    /etc/rc.d/netif restart

    then the ip address which I assigned is removing.

    And i am unable to find /etc/rc.config in my machine to assign ip address.

    I want to know the network file in pfsense or atleast I need to assign the ip address permanently.

    Can you anyone help me to do this?

    Thank you :)



  • After instalation the IP address of the pfSense LAN interface is set to 192.168.1.1. It can then be changed from the console menu (item 2) or through the pfSense web GUI.

    pfSense uses FreeBSD but it is not FreeBSD. Generally pfSense doesn't use FreeBSD configuration mechanisms (hence doesn't have /etc/rc.config) and regenerates any necessary configuration files from its own single configuration file which is best managed through the web GUI.

    If you couldn't access the pfSense web GUI on 192.168.1.1 after installation then most likely you have some sort of configuration error such as gear connected to the wrong NIC or broken cable or multiple NICs in the same IP subnet.



  • Connect a screen and keyboard to the pfsense box. You can see, and set, the addresses from the console, using the pfsense utilities. Common configuration is for the WAN to get DHCP address from upstream, and the LAN is at 192.168.1.1 by default. Avoid the "bare metal," it will do the opposite of helping. Since you've been doing that, start with a wipe and clean install - when the install completes, look at the screen - if it booted successfully, you'll see the network addresses right over the menu of numbered items. Without mucking with the pfsense at all, and without connecting anything else to the pfsense, connect a computer (or hub/switch and computer, depending how old the networking equipment is) to the pfsense LAN. Connect to 192.168.1.1, or a different address if you have changed the address during the install or at the console.

    If your existing LAN is 192.168.1.X there is potential or confusion and routing weirdness. It may well already have a 192.168.1.1 if it's up and running with another default router configured if you connect it to the pfsense LAN port, and routing/NAT can become confused if you connect the pfsense WAN port to a LAN at 192.168.1.X while its own LAN is set to 192.168.1.X.

    As such (and to have better results if you ever get into VPNs), I recommend always moving your pfsense LAN network to one of the many other private address ranges - avoid 192.168.1.x, 192.168.0.x, 192.168.2.x, 192.168.100.x, 10.0.X.X, 172.16.X.X as being "too commonly default on some box." Leaves you many less cluttered options to choose from….console menu item 2 allows setting the interfaces and addresses from the console. Try 172.20.30.1/24 for an example (unless you have enough users to suggest a network larger than /24 - I run a /22 and a /18 myself.)

    If you disconnect the other router and connect the pfsense in its place, you should be fine, so long as you've paid attention so that the pfsense LAN is the port you think it is, and the pfsense WAN is the port you think it is. Getting those backwards can cause problems, of course, and is easy to do - but also easy to fix from the console.



  • Thank you All for your fast replies,

    Now I set the ip for wan. From wan web interface, I was added other nic device for lan and assigned lan ip.
    I can able to get the the home page but. after login i am getting the following error.

    "An HTTP_REFERER was detected other than what is defined in System -> Advanced (https://172.16.36.86/index.php?logout). You can disable this check if needed in System -> Advanced -> Admin."

    And I presently disabled the firewall by pfctl -d.

    I am don't know what to do and where to clear this issue..

    please help me to clear this..

    Thank you for your understanding..



  • @satyadev75:

    I am don't know what to do and where to clear this issue..

    On  System -> Advanced -> Admin tick the box to disable DNS Rebind check and Save.

    It is preferred to access the pfSense web GUI from the LAN interface to reduce security risk.



  • Thank you. It helped me.