Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
d81f6b83
Commit
d81f6b83
authored
Aug 31, 2016
by
Leigh B Stoller
Browse files
Oops, forgot to commit the added rules to block port 111.
parent
3246c031
Changes
1
Hide whitespace changes
Inline
Side-by-side
clientside/tmcc/linux/xen/emulab-cnet.pl
View file @
d81f6b83
...
...
@@ -347,27 +347,28 @@ sub Online()
#
# rpcbind port restrictions. Probably need a better way to handle
# these cases.
# these cases. Note the -I; these need to go at the beginning of
# the chain (and note that the rules are reversed cause of that).
#
if
(
isRoutable
(
$vnode_ip
))
{
push
(
@rules
,
"
-
A
$INCOMING_CHAIN
-s
$network
/
$cnet_mask
-p tcp
"
.
"
--dport 111 -j
ACCEPT
");
"
-
I
$INCOMING_CHAIN
"
.
"
-p udp
--dport 111 -j
DROP
");
push
(
@rules
,
"
-
A
$INCOMING_CHAIN
-s
$network
/
$cnet_mask
-p udp
"
.
"
--dport 111 -j
ACCEPT
");
"
-
I
$INCOMING_CHAIN
"
.
"
-p tcp
--dport 111 -j
DROP
");
push
(
@rules
,
"
-
A
$INCOMING_CHAIN
-s
$jail_network
/
$jail_netmask
-p
tc
p
"
.
"
-
I
$INCOMING_CHAIN
-s
$jail_network
/
$jail_netmask
-p
ud
p
"
.
"
--dport 111 -j ACCEPT
");
push
(
@rules
,
"
-
A
$INCOMING_CHAIN
-s
$jail_network
/
$jail_netmask
-p
ud
p
"
.
"
-
I
$INCOMING_CHAIN
-s
$jail_network
/
$jail_netmask
-p
tc
p
"
.
"
--dport 111 -j ACCEPT
");
push
(
@rules
,
"
-
A
$INCOMING_CHAIN
-s
$
jail_
network
/
$
jail_
netmask
"
.
"
-p tcp
--dport 111 -j
DROP
");
"
-
I
$INCOMING_CHAIN
-s
$network
/
$
c
net
_
mask
-p udp
"
.
"
--dport 111 -j
ACCEPT
");
push
(
@rules
,
"
-
A
$INCOMING_CHAIN
-s
$
jail_
network
/
$
jail_
netmask
"
.
"
-p udp
--dport 111 -j
DROP
");
"
-
I
$INCOMING_CHAIN
-s
$network
/
$
c
net
_
mask
-p tcp
"
.
"
--dport 111 -j
ACCEPT
");
}
#
# Watch for a vnode with a public IP, no need to nat.
...
...
@@ -528,10 +529,10 @@ sub Offline()
"
-D
$INCOMING_CHAIN
-s
$jail_network
/
$jail_netmask
-p udp
"
.
"
--dport 111 -j ACCEPT
");
push
(
@rules
,
"
-D
$INCOMING_CHAIN
-s
$jail_network
/
$jail_netmask
"
.
"
-D
$INCOMING_CHAIN
"
.
"
-p tcp --dport 111 -j DROP
");
push
(
@rules
,
"
-D
$INCOMING_CHAIN
-s
$jail_network
/
$jail_netmask
"
.
"
-D
$INCOMING_CHAIN
"
.
"
-p udp --dport 111 -j DROP
");
}
#
...
...
Write
Preview
Supports
Markdown
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