[LTS/blocker] CLOUDSTACK-6432: Prevent DNS reflection attacks - #1663
Conversation
|
New smoke test result: $ nosetests --with-xunit --xunit-file=integration-test-results.xml --with-marvin --marvin-config=/home/bhaisaab/Lab/apache/marvin-cfgs/adv-kvm.cfg -s -a tags=advanced,required_hardware=true --zone=KVM-advzone --hypervisor=KVM test_router_dns.py ==== Marvin Init Started ==== === Marvin Parse Config Successful === === Marvin Setting TestData Successful=== ==== Log Folder Path: /tmp//MarvinLogs//Aug_26_2016_19_25_30_U977TH. All logs will be available here ==== === Marvin Init Logging Successful=== ==== Marvin Init Successful ==== Starting test_router_dns_guestipquery... ====Trying SSH Connection: Host:192.168.20.18 User:root Port:22 RetryCnt:5=== |
5adacc9 to
3f588c3
Compare
| except Exception as e: | ||
| self.fail("Failed to SSH into VM - %s due to exception: %s" % (nat_rule1.ipaddress, e)) | ||
|
|
||
| self.assertTrue(result is not None and "google.com" in result and "#53" in result, |
There was a problem hiding this comment.
Minor nit: Consider breaking up into three asserts with more detailed messages to improve the isolation of a failure
|
@NuxRo Any thoughts to add? |
3f588c3 to
56ad2c8
Compare
|
Thanks a lot for implementing this properly :) |
56ad2c8 to
9033200
Compare
|
LGTM, I was able to build and test the PR. Found a little issue with the tests and fixed it. |
|
Thanks @borisstoyanov |
DNS on VR should not be publically accessible as it may be prone to DNS amplification/reflection attacks. This fixes the issue by only allowing VR DNS (port 53) to be accessible from guest network cidr, as per the fix in: https://issues.apache.org/jira/browse/CLOUDSTACK-6432 - Only allows guest network cidrs to query VR DNS on port 53. - Includes marvin smoke test that checks the VR DNS accessibility checks from guest and non-guest network. - Fixes Marvin sshClient to avoid using ssh agent when password is provided, previous some environments may have seen 'No existing session' exception without this fix. - Adds a new dnspython dependency that is used to perform dns resolutions in the tests. Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
9033200 to
14504dc
Compare
|
Thanks all, based on the test results and reviews from this PR with the marvin test and the original PR #1653 from where the main changes were taken, I'll go ahead and merge this now. |
[LTS/blocker] CLOUDSTACK-6432: Prevent DNS reflection attacksCLOUDSTACK-6432: Prevent DNS reflection attacks
DNS on VR should not be publically accessible as it may be prone to DNS
amplification/reflection attacks. This fixes the issue by only allowing VR
DNS (port 53) to be accessible from guest network cidr, as per the fix in:
https://issues.apache.org/jira/browse/CLOUDSTACK-6432
- Only allows guest network cidrs to query VR DNS on port 53.
- Includes marvin smoke test that checks the VR DNS accessibility checks from
guest and non-guest network.
- Fixes Marvin sshClient to avoid using ssh agent when password is provided,
previous some environments may have seen 'No existing session' exception without
this fix.
- Adds a new dnspython dependency that is used to perform dns resolutions in the
tests.
Due to repository commit issues I've created this PR, based on #1653 .
/cc @jburwell @karuturi @NuxRo @ustcweizhou @wido and others
* pr/1663:
CLOUDSTACK-6432: Prevent DNS reflection attacks
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
|
After patching our systemvm.iso and the respective routers, I've noticed the iptables rules changed as given in CsAddress.py. These rules don't get any packets since two identical (but unpatched) rules apply before. I found these in CsApp.py. |
|
@s-seitz the fix should work for newly deployed VRs, for existing VR there may be existing rules or chains blocking the intended fix. Are you getting issues or seeing the same behaviour with new VRs? If yes, can you send a fix. Thanks. |
CLOUDSTACK-6432: Prevent DNS reflection attacks
Due to repository commit issues I've created this PR, based on #1653 .
/cc @jburwell @karuturi @NuxRo @ustcweizhou @wido and others