lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 1 Sep 2015 16:23:39 -0700
From:	James Loosli <loosli@...il.com>
To:	netdev@...r.kernel.org
Subject: Issue with /etc/netns/${nsname}/hosts

I seem to have an issue with using namespace-specific hosts files.
Here's an example.

I have different entries for foo.com in my hosts file for the
namespace and the system-wide hosts file;

root@...ver-01 Tue Sep 01 04:15:02pm
> cat /etc/netns/nsXX-XXX-240-3/hosts | grep foo
1.2.3.4 foo.com
root@...ver-01 Tue Sep 01 04:15:15pm
> ip netns exec nsXX-XXX-240-3 cat /etc/hosts | grep foo
1.2.3.4 foo.com
root@...ver-01 Tue Sep 01 04:15:19pm
> cat /etc/hosts | grep foo
0.0.0.0 foo.com

But when I try to get curl, ping or other utilities to use that hosts
file entry, they ignore the namespace-specific file.

root@...ver-01 Tue Sep 01 04:16:02pm
> ip netns exec ns91-227-240-3 curl -vv foo.com
* About to connect() to foo.com port 80 (#0)
*   Trying 0.0.0.0...
* Connection refused
* couldn't connect to host
* Closing connection #0
curl: (7) couldn't connect to host
root@...ver-01 Tue Sep 01 04:16:08pm
> curl -vv foo.com
* About to connect() to foo.com port 80 (#0)
*   Trying 0.0.0.0...
* Connection refused
* couldn't connect to host
* Closing connection #0
curl: (7) couldn't connect to host

Not sure what I'm doing wrong, but this behavior seems to contradict
what I find in the manpages for iproute2 and netns /etc files. Could
this be permissions related?

Regards,

James Loosli
949.439.6109
loosli@...il.com
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ