Jump to content

Can we run a server 24/7 on hamachi


adeindra6

Recommended Posts

Hamachi is a VPN software which creates a tunnel between your network and another local network, if you're goanna host a public 24/7 server Hamachi is worthless. Port forwarding refers to your router, that small box you have between your PC and the internet cable (fiber) or your modem (adsl). Iptables are the local firewall that comes with most Linux systems, if you have a router it probably have a firewall built in, which means you won't need to use iptables. You can easy disable it with this bash script:

#!/bin/bash 
# reset.fw - Reset firewall 
# set x to 0 - No reset 
# set x to 1 - Reset firewall 
# --------------------------------------------------------------------------------------------------------------- 
# Added support for IPV6 Firewall 
# --------------------------------------------------------------------------------------------------------------- 
# Written by Vivek Gite <[email protected]> 
# --------------------------------------------------------------------------------------------------------------- 
# You can copy / paste / redistribute this script under GPL version 2.0 or above 
# ============================================================= 
x=1 
  
# set to true if it is CentOS / RHEL / Fedora box 
RHEL=false 
  
### no need to edit below  ### 
IPT=/sbin/iptables 
IPT6=/sbin/ip6tables 
  
if [ "$x" == "1" ]; 
then 
    if [ "$RHEL" == "true" ]; 
    then 
          # reset firewall using redhat script 
        /etc/init.d/iptables stop 
        /etc/init.d/ip6tables stop 
    else 
        # for all other Linux distro use following rules to reset firewall 
        ### reset ipv4 iptales ### 
        $IPT -F 
        $IPT -X 
        $IPT -Z 
        for table in $(</proc/net/ip_tables_names) 
        do 
            $IPT -t $table -F 
            $IPT -t $table -X 
            $IPT -t $table -Z 
        done 
        $IPT -P INPUT ACCEPT 
        $IPT -P OUTPUT ACCEPT 
        $IPT -P FORWARD ACCEPT 
        ### reset ipv6 iptales ### 
        $IPT6 -F 
        $IPT6 -X 
        $IPT6 -Z 
        for table in $(</proc/net/ip6_tables_names) 
        do 
            $IPT6 -t $table -F 
            $IPT6 -t $table -X 
            $IPT6 -t $table -Z 
        done 
        $IPT6 -P INPUT ACCEPT 
        $IPT6 -P OUTPUT ACCEPT 
        $IPT6 -P FORWARD ACCEPT 
    fi 
else 
        : 
fi 

Source: http://www.cyberciti.biz/faq/turn-on-turn-off-firewall-in-linux/

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...