Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Squid - firewall rules sanitization and fixes #305

Merged
merged 7 commits into from
Feb 22, 2017

Conversation

doktornotor
Copy link
Contributor

@doktornotor doktornotor commented Feb 14, 2017

Transparent proxy:

  • Use rdr pass to pass traffic.
  • Fix the rules so that they no longer pass traffic to 80/443 (plus 3128/3129) to everywhere except the transparent proxy interface(s), which was impossible to override by user rules due to the quick option being used.
  • Fix faulty logic where no rules were generated for transparent proxy when 'Allow Users on Interface' was not checked. Split and move these checks to proper places to skip either the NAT rules or the filter rules as needed.

Non-transparent proxy:

  • Pass the traffic to the configured proxy interface and ports only.
  • Fix the rules so that the required traffic is passed to proxy when 'Allow Users on Interface' is checked

Others:

  • Fixes/updates for PPPoE handling.
  • Add lots of comments here to avoid future confusion.

XMLRPC

  • Add configurable username for XMLRPC sync for 2.4. Defaults to "admin" if blank, no problems with 2.3.x

For a quick idea, here's a comparison of rules generated by the old and new code, with a really simple setup:

  • LAN = igb0_vlan10 being a non-transparent interface
  • WLAN = igb0_vlan88 being set up as transparent interface with SSL/MITM
    proxy ports default 3128/3129
  • RFC1918 excluded from proxying

Old rules

no rdr on igb0_vlan88 inet proto tcp from any to 192.168.0.0/16 port = http
no rdr on igb0_vlan88 inet proto tcp from any to 192.168.0.0/16 port = https
no rdr on igb0_vlan88 inet proto tcp from any to 172.16.0.0/12 port = http
no rdr on igb0_vlan88 inet proto tcp from any to 172.16.0.0/12 port = https
no rdr on igb0_vlan88 inet proto tcp from any to 10.0.0.0/8 port = http
no rdr on igb0_vlan88 inet proto tcp from any to 10.0.0.0/8 port = https

rdr on igb0_vlan88 inet proto tcp from any to ! (igb0_vlan88) port = http -> 127.0.0.1 port 3128
rdr on igb0_vlan88 inet proto tcp from any to ! (igb0_vlan88) port = https -> 127.0.0.1 port 3129

pass in quick on igb0_vlan88 proto tcp from any to ! (igb0_vlan88) port = http flags S/SA keep state
pass in quick on igb0_vlan88 proto tcp from any to ! (igb0_vlan88) port = https flags S/SA keep state
pass in quick on igb0_vlan88 proto tcp from any to ! (igb0_vlan88) port = 3128 flags S/SA keep state
pass in quick on igb0_vlan88 proto tcp from any to ! (igb0_vlan88) port = 3129 flags S/SA keep state

New rules

no rdr on igb0_vlan88 inet proto tcp from any to 192.168.0.0/16 port = http
no rdr on igb0_vlan88 inet proto tcp from any to 192.168.0.0/16 port = https
no rdr on igb0_vlan88 inet proto tcp from any to 172.16.0.0/12 port = http
no rdr on igb0_vlan88 inet proto tcp from any to 172.16.0.0/12 port = https
no rdr on igb0_vlan88 inet proto tcp from any to 10.0.0.0/8 port = http
no rdr on igb0_vlan88 inet proto tcp from any to 10.0.0.0/8 port = https

rdr pass on igb0_vlan88 inet proto tcp from any to ! (igb0_vlan88) port = http -> 127.0.0.1 port 3128
rdr pass on igb0_vlan88 inet proto tcp from any to ! (igb0_vlan88) port = https -> 127.0.0.1 port 3129

pass in quick on igb0_vlan10 proto tcp from any to (igb0_vlan10) port = 3128 flags S/SA keep state
pass in quick on igb0_vlan88 proto tcp from any to (igb0_vlan88) port = 3128 flags S/SA keep state
pass in quick on lo0 proto tcp from any to (lo0) port = 3128 flags S/SA keep state
pass in quick on igb0_vlan10 proto tcp from any to (igb0_vlan10) port = 3129 flags S/SA keep state
pass in quick on igb0_vlan88 proto tcp from any to (igb0_vlan88) port = 3129 flags S/SA keep state
pass in quick on lo0 proto tcp from any to (lo0) port = 3129 flags S/SA keep state

Transparent proxy:
- Use rdr pass to pass traffic.
- Fix the rules so that they no longer pass traffic to 80/443 (plus 3128/3129) to everywhere except the transparent proxy interface(s), which was impossible to override by user rules due to the quick option being used.
- Fix faulty logic where no rules were generated for transparent proxy when 'Allow Users on Interface' was not checked. Split and move these checks to proper places to skip either the NAT rules or the filter rules as needed.

Non-transparent proxy:
- Pass the traffic to the configured proxy interface and ports only. 
- Fix  the rules so that the required traffic is passed to proxy when 'Allow Users on Interface' is checked

Others:
- Fixed/updates for PPPoE handling.
- Add lots of comments here to avoid future confusion.
@netgate-git-updates netgate-git-updates merged commit c8d2946 into pfsense:devel Feb 22, 2017
@doktornotor doktornotor deleted the patch-1 branch February 22, 2017 15:45
netgate-git-updates pushed a commit that referenced this pull request Aug 15, 2018
  [ Robert Edmonds ]
  * Release 1.3.1.

  * Restore protobuf-2.x compatibility (#284, #285).

  * Use xenial and protobuf 3.6.1 in the Travis-CI environment (#332).

  * Convert uses of protobuf's scoped_ptr.h to C++11 std::unique_ptr, needed
    to compile against protobuf 3.6.1 (#320, #333).

  * Use AX_CXX_COMPILE_STDCXX macro to enable C++11 support in old compilers
    (#312, #317, #327, #334).

  [ Fredrik Gustafsson ]
  * Add std:: to some types (#294, #305, #309).

  [ Sam Collinson ]
  * Check the return value of int_range_lookup before using as an array
    index; it can return -1 (#315).

  [ Matthias Dittrich ]
  * Fix compilation on mingw by using explicit protoc --plugin=NAME=PATH
    syntax in Makefile.am (#289, #290).

Sponsored by:	Farsight Security, Inc.
netgate-git-updates pushed a commit that referenced this pull request Mar 31, 2020
FreeBSD-relevant ChangeLog extract since 3.0.6:
   * Remove RANDFILE environment variable (#261)
   * Workaround for bug in win32 mktemp (#247, #305, PR #312)
   * Handle IP address in SAN and renewals (#317)
   * Workaround for ash and no set -o echo (#319)
   * Shore up windows testing framework (#314)
   * Provide upgrade mechanism for older versions of EasyRSA (#349)
   * Add support for KDC certificates (#322)
   * Add support for Edward Curves (#354, #350)
   * Add support for EASYRSA_PASSIN and EASYRSA_PASSOUT env vars (#368)
   * Add support for RID to SAN (#362)

Update WWW: link in pkg-descr.

Remove patches that have been integrated upstream.

Shuffle USES=-line to please portlint.

Add NO_ARCH=yes, since this is all scripts and text.

Reported by:	Eric F Crist (upstream maintainer)
netgate-git-updates pushed a commit that referenced this pull request Jul 5, 2022
Changes since 0.3.0:

We reached v1.0.0

- fix!: Replace limit flag with paginate by @ankitpokhrel in #359
- fix!: Append components on edit instead of overriding by @ankitpokhrel in #368
- feat!: Append label to an issue, show labels at issue list view by @stchar in #300
- refactor!: Move boards and project list to subcommand by @ankitpokhrel in #314

- feat: Support custom fields on issue create by @ankitpokhrel in #319
- feat: Add support to read from .netrc by @adolsalamanca in #329
- feat: Add support for OS keyrings/-chains by @boyvanamstel in #348
- feat: Support auth with personal access tokens by @marek-veber / @ankitpokhrel in #327
- feat: Allow to set fixVersions on issue creation by @ankitpokhrel in #276
- feat: Allow insecure TLS by @ankitpokhrel in #305
- feat: Add --no-browser option to open cmd by @ankitpokhrel in #308
- feat: Add search option for boards on jira init by @ankitpokhrel in #322
- feat: Add issues unlink command by @sushilkg in #347
- feat: Support refresh for issues list by @GZLiew in #325
- feat: Ability to delete issue by @ankitpokhrel in #336
- feat: Allow to set custom fields on epic create by @ankitpokhrel in #364
- feat: Allow to edit release-info/fixVersions by @ankitpokhrel in #365
- feat: Allow removing labels on edit by @ankitpokhrel in #371
- feat: Support creating issues with custom subtask type by @danobi in #372
- feat: Allow removing component on edit by @ankitpokhrel in #374
- feat: Allow removing fixVersions on edit by @ankitpokhrel in #376
- feat: Support custom fields on issue edit by @ankitpokhrel in #377
- feat: Jira init non-interactive by @ankitpokhrel in #381
- feat: Show subtasks in issue view by @ankitpokhrel in #382
- feat: Allow project filter in raw jql by @ankitpokhrel in #395

- fix: Makefile compatiblity with Make 3.81 by @danmichaelo in #252
- fix: Config generation issue by @ankitpokhrel in #275
- fix(cfg): Strip trailing slash on server name by @ankitpokhrel in #295
- fix: Jira client should respect timeout opt by @ankitpokhrel in #304
- fix: Respect GLAMOUR_STYLE env on issue view by @ankitpokhrel in #317
- fix: Get subtask handle from config by @ankitpokhrel in #296
- fix: Jira wiki parser by @ankitpokhrel in #326
- fix: Display correctly columns in list sprint command help by @adolsalamanca in #320
- fix: Panic on empty sub-list by @ankitpokhrel in #330
- fix: Issue with assigning user by @ankitpokhrel in #321
- fix: OOM bug on issue view by @ankitpokhrel in #350
- fix: Assign parent key as is on edit by @ankitpokhrel in #351
- fix: Add additional check for total boards returned by @ankitpokhrel in #360
- fix: Issue with query param in user assignment by @ankitpokhrel in #380
- fix: Subtask clone by @ankitpokhrel in #383
- fix: editing issue with custom field in non interactive mode by @DrudgeRajen in #391

- dep: Upgrade charmbracelet/glamour to 0.5.0 by @ankitpokhrel in #309
- dep: Upgrade rivo/tview to latest by @ankitpokhrel in #310
- dep: Upgrade outdated packages by @ankitpokhrel in #311
- dep: Upgrade cobra to 1.4.0 by @ankitpokhrel in #373

- Use md ext for tmp file to trigger vim syntax by @ElementalWarrior in #318

Full Changelog: ankitpokhrel/jira-cli@v0.3.0...v1.0.0
netgate-git-updates pushed a commit that referenced this pull request Mar 31, 2023
ChangeLog: https://github.com/cbsd/reggae/releases/tag/0.3.5

 * Be more aggressive in destroying epair by @mekanix in #304
 * Handle case when hostname is empty by @mekanix in #305

PR:		270548
Reported by:	meka@tilda.center (maintainer)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants