I found this script and am trying to get it to work for my
computer. It is to restrict connections to the VPN. The thing I
don't understand is what IP address to use. I have been looking
on the NET, but am not familiar with networking. In this script
the person uses 192.168.1.0/24
I think this is for a network. I am connected to shaw through a
cable modem, so I need to know what IP would be used in my
case.

Thanks


#!/bin/sh

/sbin/iptables -P INPUT DROP

/sbin/iptables -A INPUT -i lo -j ACCEPT

/sbin/iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT

/sbin/iptables -A INPUT -i eth0 -s 192.168.1.0/24 -j ACCEPT

/sbin/iptables -A OUTPUT -o eth0 -d 192.168.1.0/24 -m state --state 
RELATED,ESTABLISHED -j ACCEPT

/sbin/iptables -A OUTPUT -p udp --sport 68 -j ACCEPT

/bin/grep -h '^remote ' /etc/openvpn/*.ovpn | /usr/bin/cut -d ' ' -f 2 
| /usr/bin/sort -du | /usr/bin/xargs -I @ /sbin/iptables -A OUTPUT -d @
 -j ACCEPT

/sbin/iptables -A OUTPUT -o eth0 -j REJECT

_______________________________________________
clug-talk mailing list
clug-talk@clug.ca
http://clug.ca/mailman/listinfo/clug-talk_clug.ca
Mailing List Guidelines (http://clug.ca/ml_guidelines.php)
**Please remove these lines when replying

Reply via email to