pfSense Support Subscription

Author Topic: Feature Add: Allow Custom Package Repository - Not Internet Connected  (Read 5600 times)

0 Members and 1 Guest are viewing this topic.

Offline mubix

  • Newbie
  • *
  • Posts: 3
  • Karma: +3/-0
    • View Profile
If you are following - http://doc.pfsense.org/index.php/Creating_Your_Own_Package_Repository and you are getting "Unable to communicate with 192.168.1.100 Please verify DNS and interface configuration, and that pfSense has functional Internet connectivity." because you are using the repo to enable a offline (non internet connected) host to be able to utilize packages all you have to do is:

Go into Services -> DNS Forwarder and add a Host Override
Host: www
Domain: pfsense.org
IP Address: 127.0.0.1
Description: null routed record to enable offline repo

Then make sure you have the IP or hostname of your package repository web server in the /pkg_mgr_settings.php (on 2.0, follow the guidelines on the doc above for older versions). After that you should be good to go. Of course this is barring any Firewall blockages you might have in place so be sure to test connectivity from the pfSense box to the web server.


Offline mubix

  • Newbie
  • *
  • Posts: 3
  • Karma: +3/-0
    • View Profile
Re: Feature Add: Allow Custom Package Repository - Not Internet Connected
« Reply #1 on: November 07, 2012, 01:01:00 pm »
Also, here is a bug report for the "issue": http://redmine.pfsense.org/issues/2586

Offline mubix

  • Newbie
  • *
  • Posts: 3
  • Karma: +3/-0
    • View Profile
Re: Feature Add: Allow Custom Package Repository - Not Internet Connected
« Reply #2 on: November 08, 2012, 02:55:21 pm »
So, that was just the beginning, it's actually better to not null-route it but make the following entries:

If your package web server is 192.168.1.100.
Next is the problem of not having the packages themselves. So wget -mk -np http://files.pfsense.org/packages/ gave me a directory that I plopped into my already existant packages directory (created from the git clone as described in the documentation) but the problem I ran into was the php files being rendered still (which made any packages that pulled php files get the rendered version instead of source).

So you need to add a .htaccess file in the packages directory with the following:

RemoveHandler .php .phtml .php3
RemoveType .php .phtml .php3
php_flag engine off

Make sure that "AllowOverride all" is enabled if you are running Apache to host the package site, if not, you'll have to google how to allow .htaccess files for your particular server. (or if you server doesn't support htaccess files then how to enable source disclosure)

After those alterations I seem to be off to the races for the most part. Some packages pull from other websites, but altering the package_8.xml or just rerouting the dns seems to solve most of those issues.