OPNsense Forum

Archive => 15.7 Legacy Series => Topic started by: curseme on October 25, 2016, 11:08:01 pm

Title: [Solved] OPNsense behind other proxy : System Update : No Connection
Post by: curseme on October 25, 2016, 11:08:01 pm
Maybe this is useful for other newbies:
I was testing OPNsense as an additional firewall & router for certain VLANs behind another firewall and proxy.
So OPNsense is installed in the existing private LAN side behind an existing proxy, port 8080.
When trying to update or get the list of plugins,  I always got : No Connection.
I had no luck using the integrated proxy with defining an upstream Proxy, also set_env did not work.

I solved my problem by adding the proxy directly to the pkg.conf via Console - Shell:
vi /usr/local/etc/pkg.conf , add
pkg_env : {
http_proxy: "http://your-poxy-ip:port/"
}

I don' t know, if this is the best way to go,  at least it worked for me ;-)
Title: Re: [Solved] OPNsense behind other proxy : System Update : No Connection
Post by: franco on October 26, 2016, 11:59:27 am
Hi curseme,

This is a very nice way to fix, I will keep this on file as a future enhancement:

https://github.com/opnsense/core/issues/1239

But the same problem is likely true for the base/kernel system. Can you run this on the root shell?

# fetch https://pkg.opnsense.org/sets/base-16.7.5-amd64.obsolete

In general, we recommend to use a local mirror instead of a proxy server, as this is fully configurable from the GUI using the "(other)" firmware settings for mirror and flavour.


Cheers,
Franco
Title: Re: [Solved] OPNsense behind other proxy : System Update : No Connection
Post by: tillsense on December 06, 2016, 07:18:05 pm
hi,

i use:
Code: [Select]
setenv HTTP_PROXY http://proxy:8080 on console before update (or add in /root/.cshrc)

cheers till
Title: Re: [Solved] OPNsense behind other proxy : System Update : No Connection
Post by: space-hunter on February 28, 2017, 03:39:01 pm
I got the same problem. After 'setenv HTTP_PROXY http://proxy:8080' some errors where fixed.
But some not. IDS Download & Update Rules do not work. It still use no proxy

Fix for me:
   edit /usr/local/opnsense/service/conf/configd.conf and add the proxy export in [environment]

#/usr/local/opnsense/service/conf/configd.conf
[main]
socket_filename:/var/run/configd.socket
pid_filename:/var/run/configd.pid

[environment]
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
HOME=/
HTTP_PROXY=http://proxy:8080
HTTPS_PROXY=http://proxy:8080
http_proxy=http://proxy:8080
https_proxy=http://proxy:8080
FTP_PROXY=http://proxy:8080
ftp_proxy=http://proxy:8080