Page 1 of 1

How to block my ip address?

PostPosted: Thu Jan 05, 2017 5:06 pm
by victornova
How to block my ip address so nobody has access to my dialer from another ip other than mine.?

Re: How to block my ip address?

PostPosted: Fri Jan 06, 2017 12:17 am
by iboam
A friend of mine give me a solution, it's working with me so im sharing with the world.

This script will open all ports to "TRUSTED SOURCES" and will block all ports to "UNTRUSTED SOURCES"

vim firewall.sh

i

#!/bin/bash
/sbin/SuSEfirewall2 off

#CLEAR ALL IPTABLE RULES
iptables -F
iptables -X

# DROP ALL INBOUND TRAFFIC
iptables -P INPUT DROP

# DROP ALL FORWARDING TRAFFIC
iptables -P FORWARD DROP

# ALLOW OUTBOUND TRAFFIC
iptables -P OUTPUT ACCEPT

# ALLOW SYSTEM TRAFFIC
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT

# ALLOW TRAFFIC FROM TRUSTED SOURCES
# HOME
iptables -A INPUT -s XXX.XXX.XXX.XXX -j ACCEPT


# TRUNKS
iptables -A INPUT -s XXX.XXX.XXX.XXX -j ACCEPT #TRUNK NAME

# DROP ALL INBOUND TRAFFIC
iptables -A INPUT -p all -j DROP

:wq


***************************************************

vim /etc/rc.d/boot.local
i
/root/firewall.sh
:wq


chmod 777 firewall.sh
chmod +x firewall.sh
./firewall.sh


iptables -vnL

Re: How to block my ip address?

PostPosted: Fri Jan 13, 2017 12:00 pm
by victornova
iboam wrote:A friend of mine give me a solution, it's working with me so im sharing with the world.

This script will open all ports to "TRUSTED SOURCES" and will block all ports to "UNTRUSTED SOURCES"

vim firewall.sh

i

#!/bin/bash
/sbin/SuSEfirewall2 off

#CLEAR ALL IPTABLE RULES
iptables -F
iptables -X

# DROP ALL INBOUND TRAFFIC
iptables -P INPUT DROP

# DROP ALL FORWARDING TRAFFIC
iptables -P FORWARD DROP

# ALLOW OUTBOUND TRAFFIC
iptables -P OUTPUT ACCEPT

# ALLOW SYSTEM TRAFFIC
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT

# ALLOW TRAFFIC FROM TRUSTED SOURCES
# HOME
iptables -A INPUT -s XXX.XXX.XXX.XXX -j ACCEPT


# TRUNKS
iptables -A INPUT -s XXX.XXX.XXX.XXX -j ACCEPT #TRUNK NAME

# DROP ALL INBOUND TRAFFIC
iptables -A INPUT -p all -j DROP

:wq


***************************************************

vim /etc/rc.d/boot.local
i
/root/firewall.sh
:wq


chmod 777 firewall.sh
chmod +x firewall.sh
./firewall.sh


iptables -vnL

Thank you very much brother, you helped me a lot

Re: How to block my ip address?

PostPosted: Sat Jan 14, 2017 9:33 pm
by williamconley
http://viciwiki.com/index.php/DGG

Dynamic Good Guys Whitelist Firewall for Vicidial

It is not actually necessary to *install* DGG, as the instructions show first how to whitelist lockdown your system. Then installing DGG is merely to allow an easy web page to add/remove authorized (whitelist) IPs plus an additional page to allow a login from a special link (so you can check the real time screen from Starbucks easily, for instance).

Re: How to block my ip address?

PostPosted: Sun Aug 20, 2017 12:59 pm
by forwardsource
http://viciwiki.com/index.php/DGG

Above mentioned site link is not working. Please advise us the script.

Re: How to block my ip address?

PostPosted: Mon Sep 04, 2017 10:11 pm
by williamconley
forwardsource wrote:http://viciwiki.com/index.php/DGG

Above mentioned site link is not working. Please advise us the script.

Um ... we were moving it (and a bunch of other webs) to a new server and somewhere in the new process it got left behind.

Back online. ;)