Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
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 |
e
grep
'(>.*>|<.*<)'
)
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