Hi Erik,
Thanks for getting back to me. I got PolarProxy installed on SO 2.2, it's using a dummy interface like described in the PolarProxy tutorial, this seems to be working. Though now I am having trouble configuring OPNsense port forwarding to capture traffic. Once I figure this out I'll write up the process for anyone who wants to try the same.
My setup is using a tap between the gateway and LAN access point, the SO management interface is also connected to the LAN access point.
I tried adding this NAT Forward rule in OPNsense:
Interface: LAN
TCP IPv4
source: LAN net with any port,
destination: any destination with port 443,
redirect to polaryproxy IP(192.168.1.3) port 10443
nat reflection: use system default (enabled)
automatic rules generated for firewall: enabled
In the NAT settings there are options for
Reflection for port forwards, enabled
Automatic outbound NAT for Reflection, enabled
With these rules going, I hit refresh on an https site, nothing loads, and PolarProxy shortly crashes right after... when I look at journalctl this is the output:
Oct 11 23:42:44 h4x-1337 PolarProxy[30474]: [10443] 192.168.1.1 -> N/A Connection from:
192.168.1.1:51359Oct 11 23:42:44 h4x-1337 PolarProxy[30474]: [10443] 192.168.1.1 -> N/A Connection from:
192.168.1.1:60007Oct 11 23:42:44 h4x-1337 PolarProxy[30474]: [10443] 192.168.1.1 -> N/A Connection from:
192.168.1.1:60136Oct 11 23:42:44 h4x-1337 PolarProxy[30474]: [10443] 192.168.1.1 -> N/A Connection from:
192.168.1.1:9479Oct 11 23:42:44 h4x-1337 PolarProxy[30474]: [10443] 192.168.1.1 -> N/A Connection from:
192.168.1.1:43495Oct 11 23:42:44 h4x-1337 PolarProxy[30474]: [10443] 192.168.1.1 -> N/A Connection from:
192.168.1.1:18350Oct 11 23:42:44 h4x-1337 PolarProxy[30474]: [10443] 192.168.1.1 -> N/A Connection from:
192.168.1.1:63989Oct 11 23:42:44 h4x-1337 PolarProxy[30474]: [10443] 192.168.1.1 -> N/A Connection from:
192.168.1.1:54534Oct 11 23:42:44 h4x-1337 PolarProxy[30474]: [10443] 192.168.1.1 -> N/A Connection from:
192.168.1.1:38743Oct 11 23:42:44 h4x-1337 PolarProxy[30474]: [10443] 192.168.1.1 -> N/A Connection from:
192.168.1.1:45148Oct 11 23:42:44 h4x-1337 PolarProxy[30474]: [10443] 192.168.1.1 -> N/A Connection from:
192.168.1.1:16869Oct 11 23:42:44 h4x-1337 PolarProxy[30474]: [10443] 192.168.1.1 -> N/A Connection from:
192.168.1.1:57737Oct 11 23:42:44 h4x-1337 PolarProxy[30474]: [10443] 192.168.1.1 -> N/A Connection from:
192.168.1.1:11496Oct 11 23:42:44 h4x-1337 PolarProxy[30474]: [10443] 192.168.1.1 -> N/A Connection from:
192.168.1.1:39182Oct 11 23:42:44 h4x-1337 PolarProxy[30474]: [10443] 192.168.1.1 -> N/A Connection from:
192.168.1.1:61013Oct 11 23:42:44 h4x-1337 PolarProxy[30474]: [10443] 192.168.1.1 -> N/A Connection from:
192.168.1.1:44999Oct 11 23:42:44 h4x-1337 PolarProxy[30474]: [10443] 192.168.1.1 -> N/A Connection from:
192.168.1.1:60132Oct 11 23:42:44 h4x-1337 PolarProxy[30474]: [10443] 192.168.1.1 -> N/A Connection from:
192.168.1.1:13983Oct 11 23:42:44 h4x-1337 PolarProxy[30474]: [10443] 192.168.1.1 -> N/A Connection from:
192.168.1.1:4090Oct 11 23:42:44 h4x-1337 PolarProxy[30474]: [10443] 192.168.1.1 -> N/A Connection from:
192.168.1.1:60659Oct 11 23:42:44 h4x-1337 PolarProxy[30474]: [10443] 192.168.1.1 -> N/A Connection from:
192.168.1.1:19147Oct 11 23:42:44 h4x-1337 PolarProxy[30474]: [10443] 192.168.1.1 -> N/A Connection from:
192.168.1.1:11559Oct 11 23:42:44 h4x-1337 PolarProxy[30474]: Unhandled Exception: System.AggregateException: One or more errors occurred. (Too many open files in system) ---> System.Net.Sockets.SocketException: Too many open files in system
Oct 11 23:42:44 h4x-1337 PolarProxy[30474]: at System.Net.Sockets.Socket.DoBeginAccept(Socket acceptSocket, Int32 receiveSize, AcceptOverlappedAsyncResult asyncResult)
Oct 11 23:42:44 h4x-1337 PolarProxy[30474]: at System.Net.Sockets.Socket.BeginAccept(Socket acceptSocket, Int32 receiveSize, AsyncCallback callback, Object state)
Oct 11 23:42:44 h4x-1337 PolarProxy[30474]: at System.Net.Sockets.Socket.BeginAccept(AsyncCallback callback, Object state)
Oct 11 23:42:44 h4x-1337 PolarProxy[30474]: at System.Net.Sockets.TcpListener.BeginAcceptTcpClient(AsyncCallback callback, Object state)
Oct 11 23:42:44 h4x-1337 PolarProxy[30474]: at System.Net.Sockets.TcpListener.<>c.<AcceptTcpClientAsync>b__28_0(AsyncCallback callback, Object state)
Oct 11 23:42:44 h4x-1337 PolarProxy[30474]: at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl(Func`3 beginMethod, Func`2 endFunction, Action`1 endAction, Object state, TaskCreationOptions creationOptions)
Oct 11 23:42:44 h4x-1337 PolarProxy[30474]: at System.Net.Sockets.TcpListener.AcceptTcpClientAsync()
Oct 11 23:42:44 h4x-1337 PolarProxy[30474]: [23B blob data]
Oct 11 23:42:44 h4x-1337 PolarProxy[30474]: --- End of inner exception stack trace ---
Oct 11 23:42:44 h4x-1337 PolarProxy[30474]: at System.Threading.Tasks.Task.WaitAllCore(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken)
Oct 11 23:42:44 h4x-1337 PolarProxy[30474]: [24B blob data]
Oct 11 23:42:45 h4x-1337 systemd[1]: PolarProxy.service: main process exited, code=dumped, status=6/ABRT
Oct 11 23:42:45 h4x-1337 systemd[1]: Unit PolarProxy.service entered failed state.
Oct 11 23:42:45 h4x-1337 systemd[1]: PolarProxy.service failed.
the list of connections logged from random ports is a few hundred to thousand long, then that sequence of errors and the PolarProxy crash, it looks like there are too many connections and PolarProxy can't handle it... but why is that happening?
Do you have any explanation on how I can fix this or what's going on?
Thanks,
Jonathan