3 // /etc/sysctl.conf generator
5 // Mark Huang <mlhuang@cs.princeton.edu>
6 // Copyright (C) 2006 The Trustees of Princeton University
11 // Get admin API handle
12 require_once 'plc_api.php';
18 $nodenetworks = $adm->GetNodeNetworks(array('ip' => $_SERVER['REMOTE_ADDR']));
19 if (!empty($nodenetworks)) {
20 $nodes = $adm->GetNodes(array($nodenetworks[0]['node_id']));
23 $nodenetworks = $adm->GetNodeNetworks($node['nodenetwork_ids']);
24 foreach ($nodenetworks as $nodenetwork) {
25 // Nodes with proxy socket interfaces need to be able to forward
26 // between the fake proxy0 interface and the real interface.
27 if ($nodenetwork['method'] == 'proxy') {
37 # Kernel sysctl configuration file for Red Hat Linux
39 # For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
40 # sysctl.conf(5) for more details.
44 # Controls IP packet forwarding
45 net.ipv4.ip_forward = <?php echo $ip_forward; ?>
47 # Controls source route verification
48 net.ipv4.conf.default.rp_filter = 1
50 # Controls the System Request debugging functionality of the kernel
53 # Controls whether core dumps will append the PID to the core filename.
54 # Useful for debugging multi-threaded applications.
55 kernel.core_uses_pid = 1
57 # TCP window scaling and broken routers
58 net.ipv4.tcp_moderate_rcvbuf=0
59 net.ipv4.tcp_default_win_scale=0
60 net.ipv4.tcp_window_scaling=1
62 # Mark only out of window RST segments as INVALID. This setting, among
63 # other things, allows data to be sent with SYN packets.
64 net.ipv4.netfilter.ip_conntrack_tcp_be_liberal=1
66 # Fixes dst cache overflow bug
67 net.ipv4.route.max_size=262144
70 net.ipv4.tcp_congestion_control = cubic
71 net.ipv4.tcp_moderate_rcvbuf = 0
72 net.core.rmem_max = 131071
73 net.core.wmem_max = 131071
74 net.ipv4.tcp_rmem = 4096 87380 4194304
75 net.ipv4.tcp_wmem = 4096 16384 4194304
76 net.netfilter.nf_conntrack_icmp_timeout = 60