need help setting up static ip in wan

Started by someordinaryguy, June 01, 2024, 04:00:08 PM

Previous topic - Next topic
June 01, 2024, 04:00:08 PM Last Edit: June 01, 2024, 06:47:43 PM by someordinaryguy
Hello Everyone

Im new to opnsense and just did a fresh install and need ur help in configuring opnsense box with my public ip configuration (im basically a noob)
I had it up and running before in dhcp mode and now i couldnt get it to run in static ip
really appreciate your help

Your ISP Should have given you various values for addresses.

In OpnSense, and most firewalls, the Gateway part is independent of the Interface part:

In your WAN Interface:
Use the values given from your ISP:
Static IPv4 Address
Maybe a static IPv6 Address .

In >> System :: Gateways :: Configuration
Add one or two gateways (If both v4 and v6 are static)

If you are configuring IPv6, you should have been assigned a static prefix like:
aaaa:bbbb:cccc:ddd0::/<number less than 64>
63 yields two IPv6 networks, 62=4, 61=8, and so forth. For a static, your ISP may even assign something like /56, which yields aaaa:bbbb:cccc:dd00:0:0:0:0/56, where 00 means 16x16 networks, 0-9,a-f, or 256 /64 networks.

Where 0 above is the starting network of your prefix, you apply one after another for each interface you want to have IPv6:

LAN Static IPv6: aaaa:bbbb:cccc:ddd0::/64
Guest static v6: aaaa:bbbb:cccc:ddd1::/64
and keep increasing until you are done.

June 02, 2024, 06:58:07 PM #2 Last Edit: June 02, 2024, 09:29:11 PM by someordinaryguy
I got it up and running but i have some queries would u mind helping me out.
should i enable dhcp leases on wan interface ? what purpose does it serve ?
i couldnt select wan gateway in lan interface
i didnt get any ipv6 details just got static ipv4
im also getting this in my wan gateway
rtt 6.7ms rttd 2.9ms wasnt getting this much before it was set to dhcp rtt 0.8 rttds 0.9
Thank you for your valuable input.

June 04, 2024, 09:41:20 AM #3 Last Edit: June 04, 2024, 10:46:08 AM by yourfriendarmando
Hi there

No problem with no ipv6, for your ipv4, it does not make sense to start DHCPv4 on the WAN. That setting seems more if your FW was like a mini ISP.

So the option will be there because it is a static, but it can be disabled for WAN.

I would manually create the Gateway first, then when you set the Interface for Static IPv4, you plug in the IP and subnet, and then can select the Gateway you created. I attached screenshots of a client's working setup, without the IP of course