Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
535634f5
Commit
535634f5
authored
Oct 30, 2017
by
Erik Stidham
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Review updates
parent
7c108f59
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
proxier.go
pkg/proxy/iptables/proxier.go
+15
-7
No files found.
pkg/proxy/iptables/proxier.go
View file @
535634f5
...
...
@@ -1604,14 +1604,22 @@ func (proxier *Proxier) syncProxyRules() {
"-m"
,
"addrtype"
,
"--dst-type"
,
"LOCAL"
,
"-j"
,
string
(
kubeNodePortsChain
))
// If the masqueradeMark has been added then we want to forward that same
// traffic, this allows NodePort traffic to be forwarded even if the default
// FORWARD policy is not accept.
writeLine
(
proxier
.
filterRules
,
"-A"
,
string
(
kubeForwardChain
),
"-m"
,
"comment"
,
"--comment"
,
`"kubernetes forwarding rules"`
,
"-m"
,
"mark"
,
"--mark"
,
proxier
.
masqueradeMark
,
"-j"
,
"ACCEPT"
,
)
// The following rules can only be set if clusterCIDR has been defined.
if
len
(
proxier
.
clusterCIDR
)
!=
0
{
glog
.
Error
(
"Should be adding the rules now"
)
writeLine
(
proxier
.
filterRules
,
"-A"
,
string
(
kubeForwardChain
),
"-m"
,
"comment"
,
"--comment"
,
`"kubernetes forwarding rules"`
,
"-m"
,
"mark"
,
"--mark"
,
proxier
.
masqueradeMark
,
"-j"
,
"ACCEPT"
,
)
// The following two rules ensure the traffic after the initial packet
// accepted by the "kubernetes forwarding rules" rule above will be
// accepted, to be as specific as possible the traffic must be sourced
// or destined to the clusterCIDR (to/from a pod).
writeLine
(
proxier
.
filterRules
,
"-A"
,
string
(
kubeForwardChain
),
"-s"
,
proxier
.
clusterCIDR
,
...
...
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