Here is the start-up
script, which in effect does check of 2 IP addresses
#!/bin/sh
#
# This script will be executed when PPP/WAN connection is established.
#
# Script for checking connection by two ping ip addresses
#
# Put checking ip addresses
package main | |
import ( | |
"fmt" | |
"io" | |
"os" | |
) | |
var path = "/Users/novalagung/Documents/temp/test.txt" |
"Plot a PNG using matplotlib in a web request, using Flask." | |
# Install dependencies, preferably in a virtualenv: | |
# | |
# pip install flask matplotlib | |
# | |
# Run the development server: | |
# | |
# python app.py | |
# |
Here is the start-up
script, which in effect does check of 2 IP addresses
#!/bin/sh
#
# This script will be executed when PPP/WAN connection is established.
#
# Script for checking connection by two ping ip addresses
#
# Put checking ip addresses
# some examples of SNAT, DNAT with iptables with comments: | |
# mainly used in start-up script | |
# masquarade all outgoing packets to be WLAN0 IP | |
iptables -t nat -A PREROUTING -s 192.168.1.2 -i eth0 -j MASQUERADE | |
# All packets leaving eth0 will have src eth0 ip address | |
iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to 192.168.1.1 | |
# match rule specifying a source port |
# Modify this file accordingly for your specific requirement. | |
# http://www.thegeekstuff.com | |
# 1. Delete all existing rules | |
iptables -F | |
# 2. Set default chain policies | |
iptables -P INPUT DROP | |
iptables -P FORWARD DROP | |
iptables -P OUTPUT DROP |