Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - guspower

#1
Hi,

I am running opnsense in a dual-wan configuration; both gateways are in a gateway group. I wish to get the public ip address for each WAN but am unable to cURL through the second gateway interface.

# uname -a
FreeBSD hub.local 14.2-RELEASE-p3 FreeBSD 14.2-RELEASE-p3 stable/25.1-n269769-0381600e81a4 SMP amd64

Using the first gateway interface, everything works fine:

# curl -vv --interface igc1 v4.ident.me
10:27:46.650277 [0-0] * Host v4.ident.me:80 was resolved.
10:27:46.650618 [0-0] * IPv6: (none)
10:27:46.650706 [0-0] * IPv4: 65.108.151.63
10:27:46.650800 [0-0] * [SETUP] added
10:27:46.650926 [0-0] *   Trying 65.108.151.63:80...
10:27:46.651148 [0-0] * Local Interface igc1 is ip 192.168.2.48 using address family 2
10:27:46.651257 [0-0] * Name '192.168.2.48' family 2 resolved to '192.168.2.48' family 2
10:27:46.651365 [0-0] * Local port: 0
10:27:46.651571 [0-0] * [SETUP] Curl_conn_connect(block=0) -> 0, done=0
10:27:46.651712 [0-0] * [SETUP] Curl_conn_connect(block=0) -> 0, done=0
10:27:46.713784 [0-0] * [SETUP] Curl_conn_connect(block=0) -> 0, done=1
10:27:46.713898 [0-0] * Connected to v4.ident.me (65.108.151.63) port 80
10:27:46.713987 [0-0] * using HTTP/1.x
10:27:46.714151 [0-0] > GET / HTTP/1.1
10:27:46.714151 [0-0] > Host: v4.ident.me
10:27:46.714151 [0-0] > User-Agent: curl/8.13.0
10:27:46.714151 [0-0] > Accept: */*
10:27:46.714151 [0-0] >
10:27:46.714612 [0-0] * Request completely sent off
10:27:46.772216 [0-0] < HTTP/1.1 200 OK
10:27:46.772324 [0-0] < Access-Control-Allow-Origin: *
10:27:46.772414 [0-0] < Alt-Svc: h3=":443"; ma=3600
10:27:46.772506 [0-0] < Cache-Control: no-cache, no-store, must-revalidate
10:27:46.772597 [0-0] < Date: Sun, 11 May 2025 10:27:46 GMT
10:27:46.772686 [0-0] < Content-Length: 14
10:27:46.772779 [0-0] < Content-Type: text/plain; charset=utf-8
10:27:46.772873 [0-0] <
10:27:46.773016 [0-0] * Connection #0 to host v4.ident.me left intact
xxx.xxx.xxx.xxx

Not so with the 2nd gateway interface: it hangs:

# curl -vv --interface igc3 v4.ident.me
10:36:47.433375 [0-0] * Host v4.ident.me:80 was resolved.
10:36:47.433710 [0-0] * IPv6: (none)
10:36:47.433798 [0-0] * IPv4: 65.108.151.63
10:36:47.433888 [0-0] * [SETUP] added
10:36:47.434012 [0-0] *   Trying 65.108.151.63:80...
10:36:47.434211 [0-0] * Local Interface igc3 is ip 192.168.1.182 using address family 2
10:36:47.434314 [0-0] * Name '192.168.1.182' family 2 resolved to '192.168.1.182' family 2
10:36:47.434418 [0-0] * Local port: 0
10:36:47.434604 [0-0] * [SETUP] Curl_conn_connect(block=0) -> 0, done=0
10:36:47.434736 [0-0] * [SETUP] Curl_conn_connect(block=0) -> 0, done=0
... (continues like this)

I did find an old issue listing a similar problem but the solution did not work.

Any help or ideas about how to progress would be much appreciated!

G