Merge pull request #60 from KasperskyLab/dev
Minor changes (loader link + iptables rule)
This commit is contained in:
		@@ -2,7 +2,7 @@
 | 
				
			|||||||
    <div class="controls" v-if="display">
 | 
					    <div class="controls" v-if="display">
 | 
				
			||||||
        <i class="off-icon" v-on:click="action('shutdown')" v-if="off_available"></i>
 | 
					        <i class="off-icon" v-on:click="action('shutdown')" v-if="off_available"></i>
 | 
				
			||||||
        <i class="quit-icon" v-on:click="action('quit')" v-if="quit_available"></i>
 | 
					        <i class="quit-icon" v-on:click="action('quit')" v-if="quit_available"></i>
 | 
				
			||||||
        <i class="home-icon" @click="$router.push({ name: 'home' })"></i>
 | 
					        <i class="home-icon" @click="$router.push({ name: 'loader' })"></i>
 | 
				
			||||||
        <i class="update-icon" v-if="update_available&&update_possible" @click="$router.push({ name: 'update' })"></i>
 | 
					        <i class="update-icon" v-if="update_available&&update_possible" @click="$router.push({ name: 'update' })"></i>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -295,9 +295,10 @@ class Network(object):
 | 
				
			|||||||
            sp.Popen(["iptables", "-A", "POSTROUTING", "-t", "nat", "-o",
 | 
					            sp.Popen(["iptables", "-A", "POSTROUTING", "-t", "nat", "-o",
 | 
				
			||||||
                      self.iface_out, "-j", "MASQUERADE"]).wait()
 | 
					                      self.iface_out, "-j", "MASQUERADE"]).wait()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            # Prevent the device to reach the 80 of TinyCheck.
 | 
					            # Prevent the device to reach the 80 and 443 of TinyCheck.
 | 
				
			||||||
            sp.Popen(["iptables", "-A", "INPUT", "-i", self.iface_in, "-d",
 | 
					            sp.Popen(["iptables", "-A", "INPUT", "-i", self.iface_in, "-d",
 | 
				
			||||||
                      "192.168.100.1", "-p", "tcp", "--dport", "80", "-j" "DROP"]).wait()
 | 
					                      "192.168.100.1", "-p", "tcp", "--match", "multiport", "--dports", "80,443", "-j" "DROP"]).wait()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            return True
 | 
					            return True
 | 
				
			||||||
        except:
 | 
					        except:
 | 
				
			||||||
            return False
 | 
					            return False
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user