Skip to content

Instantly share code, notes, and snippets.

@pacmac
Last active June 23, 2019 09:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pacmac/348d9db22dbe90bbe0942d6c642a79b5 to your computer and use it in GitHub Desktop.
Save pacmac/348d9db22dbe90bbe0942d6c642a79b5 to your computer and use it in GitHub Desktop.
Install sniproxy
## curl -o bashrc.pac -L https://gist.github.com/pacmac/348d9db22dbe90bbe0942d6c642a79b5/raw/
apt-get install autotools-dev cdbs debhelper dh-autoreconf dpkg-dev gettext libev-dev libpcre3-dev pkg-config git -y
cd ~
mkdir udns
cd udns
wget http://ftp.de.debian.org/debian/pool/main/u/udns/udns_0.4-1.dsc
wget http://ftp.de.debian.org/debian/pool/main/u/udns/udns_0.4.orig.tar.gz
wget http://ftp.de.debian.org/debian/pool/main/u/udns/udns_0.4-1.debian.tar.gz
tar xfz udns_0.4.orig.tar.gz
cd udns-0.4/
tar xfz ../udns_0.4-1.debian.tar.gz
dpkg-buildpackage
cd ..
dpkg -i *.deb
cd ~
git clone https://github.com/dlundquist/sniproxy
cd sniproxy
./autogen.sh && ./configure
make && make install
/etc/sniproxy.conf
## UFW RULE
# ufw allow from xxx.xxx.xxx.xxx
user nobody
pidfile /var/run/sniproxy.pid
error_log {
syslog daemon
priority notice
}
listen 80 {
table http
proto http
access_log {
filename /var/log/sniproxy/http_access.log
priority notice
}
}
listen 443 {
table https
proto tls
access_log {
filename /var/log/sniproxy/https_access.log
priority notice
}
}
table http {
.*\\.* * 80
}
table https {
.*\\.* * 443
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment