Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pfsense-ident-proxy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Cool Fire
pfsense-ident-proxy
Commits
bf0c8a28
Commit
bf0c8a28
authored
Jan 26, 2015
by
Cool Fire
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed pfctl parsing for new output format of 'pfctl -ss'
parent
dc49e3cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
identproxy.rb
identproxy.rb
+4
-4
No files found.
identproxy.rb
View file @
bf0c8a28
...
...
@@ -55,12 +55,12 @@ end
# Look up function for NAT table
def
natlookup
(
p1
,
p2
)
# Execute shell command to get NAT table
nattable
=
%x(
pfctl -ss | egrep '(>.*>|<.*<)'
)
nattable
=
%x(
pfctl -ss | grep "
\(
"
)
# Search NAT table for matching enties
if
(
nattable
=~
/tcp (.+):
(.+) -> (.+):
#{
p1
}
-> (.+):
#{
p2
}
/
)
server
=
$
1
p1
=
$
2
.
to_i
if
(
nattable
=~
/tcp (.+):
#{
p1
}
\((.+):(.+)\)
-> (.+):
#{
p2
}
/
)
server
=
$
2
p1
=
$
3
.
to_i
return
[
server
,
p1
,
p2
]
else
return
nil
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment