diff --git a/e2e/cluster/cluster.go b/e2e/cluster/cluster.go index a6af67b60..ddb858638 100644 --- a/e2e/cluster/cluster.go +++ b/e2e/cluster/cluster.go @@ -289,32 +289,32 @@ func CreateProxy(in *Input) string { func ConfigureProxy(in *Input) { // starts by installing dependencies, setting up the second network interface ip // address and configuring iptables to allow dns requests forwarding (nat). - proxyName := fmt.Sprintf("node-%s-proxy", in.id) - for _, cmd := range [][]string{ - {"apt-get", "update", "-y"}, - {"apt-get", "install", "-y", "iptables", "squid"}, - {"ip", "addr", "add", "10.0.0.254/24", "dev", "eth1"}, - {"ip", "link", "set", "eth1", "up"}, - {"sysctl", "-w", "net.ipv4.ip_forward=1"}, - {"iptables", "-t", "nat", "-o", "eth0", "-A", "POSTROUTING", "-p", "udp", "--dport", "53", "-j", "MASQUERADE"}, - } { - RunCommandOnNode(in, cmd, proxyName) - } - - // create a simple squid configuration that allows for localnet access. upload it - // to the proxy in the right location. restart squid to apply the configuration. - tmpfile, err := os.CreateTemp("", "squid-config-*.conf") - if err != nil { - in.T.Fatalf("Failed to create temp file: %v", err) - } - defer os.Remove(tmpfile.Name()) - if _, err = tmpfile.WriteString("http_access allow localnet\n"); err != nil { - in.T.Fatalf("Failed to write to temp file: %v", err) - } - file := File{SourcePath: tmpfile.Name(), DestPath: "/etc/squid/conf.d/ec.conf", Mode: 0644} - tmpfile.Close() - CopyFileToNode(in, proxyName, file) - RunCommandOnNode(in, []string{"systemctl", "restart", "squid"}, proxyName) + //proxyName := fmt.Sprintf("node-%s-proxy", in.id) + //for _, cmd := range [][]string{ + // {"apt-get", "update", "-y"}, + // {"apt-get", "install", "-y", "iptables", "squid"}, + // {"ip", "addr", "add", "10.0.0.254/24", "dev", "eth1"}, + // {"ip", "link", "set", "eth1", "up"}, + // {"sysctl", "-w", "net.ipv4.ip_forward=1"}, + // {"iptables", "-t", "nat", "-o", "eth0", "-A", "POSTROUTING", "-p", "udp", "--dport", "53", "-j", "MASQUERADE"}, + //} { + // RunCommandOnNode(in, cmd, proxyName) + //} + // + //// create a simple squid configuration that allows for localnet access. upload it + //// to the proxy in the right location. restart squid to apply the configuration. + //tmpfile, err := os.CreateTemp("", "squid-config-*.conf") + //if err != nil { + // in.T.Fatalf("Failed to create temp file: %v", err) + //} + //defer os.Remove(tmpfile.Name()) + //if _, err = tmpfile.WriteString("http_access allow localnet\n"); err != nil { + // in.T.Fatalf("Failed to write to temp file: %v", err) + //} + //file := File{SourcePath: tmpfile.Name(), DestPath: "/etc/squid/conf.d/ec.conf", Mode: 0644} + //tmpfile.Close() + //CopyFileToNode(in, proxyName, file) + //RunCommandOnNode(in, []string{"systemctl", "restart", "squid"}, proxyName) // set the default route on all other nodes to point to the proxy we just created. // this makes it easier to ensure no internet will work on them other than dns and