OPNsense Forum

English Forums => General Discussion => Topic started by: Juicestyle on September 25, 2024, 11:54:08 AM

Title: No internet connection with IP Public as WAN
Post by: Juicestyle on September 25, 2024, 11:54:08 AM
Hello,

I'm trying to configure my WAN interface with a public IP address.
I've successfully configured my public IP on my WAN interface and set up my gateway.


However, when I connect to the LAN, I can't get out.

Do I need to configure SNAT?

Have a gode day
Title: Re: No internet connection with IP Public as WAN
Post by: Seimus on September 25, 2024, 12:01:15 PM
Yes you need Outbound NAT.

When you have automatic or Hybrid NAT rules following is the behavior:

A. When you use DHCP on your WAN, those NAT rules are created automatically.
B. When you set a Static IP on your WAN, but dont specify a GW on the Interface the NAT is not automatically created
C. When you set Static IP on your WAN, and specify GW on the Interface the NAT is automatically created.

https://docs.opnsense.org/manual/interfaces.html#assignments

Regards,
S.
Title: Re: No internet connection with IP Public as WAN
Post by: Juicestyle on September 25, 2024, 12:10:07 PM
OK, I create outbout rule:

Title: Re: No internet connection with IP Public as WAN
Post by: Seimus on September 25, 2024, 12:15:00 PM
From that picture, you already had auto rules created for all your LAN interfaces. So NATing should work from LAN > WAN. You dont need a manual NAT rule in this case and also the one you created is missconfigured.

Try to do some further checks from a LAN device like:

nslookup google.com
ping google.com
tracert google.com - Windows device
traceroute google.com - Linux device

Also how are your Rules set on the LAN e.g network from which is not working for you?

Regards,
S.
Title: Re: No internet connection with IP Public as WAN
Post by: Juicestyle on September 25, 2024, 12:28:02 PM
Ping to google.fr:
Error during name resolution

Ping 9.9.9.9:
PING 9.9.9.9 (9.9.9.9) 56(84) bytes of data.

--- 9.9.9.9 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2072ms