Skip to content

Instantly share code, notes, and snippets.

@jatrost
Created May 11, 2015 01: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 jatrost/a21a7422ea93e9c8fbac to your computer and use it in GitHub Desktop.
Save jatrost/a21a7422ea93e9c8fbac to your computer and use it in GitHub Desktop.

I believe here is the fix. This just needs to be integrated into the kippo deploy.

ensure this is in the kippo.cfg

[honeypot]
ssh_addr = 127.0.0.1
ssh_port = 64222

New start.sh

#!/bin/sh

echo "Adding iptables port forwarding rule...\n"
sysctl -w net.ipv4.conf.eth0.route_localnet=1
iptables -F -t nat
iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 22 -j DNAT --to-destination 127.0.0.1:64222

echo "Starting kippo in the background...\n"
cd $(dirname $0)
exec /usr/bin/twistd -n -y kippo.tac -l log/kippo.log --pidfile kippo.pid

New supervisord kipp config

[program:kippo]
command=/opt/kippo/start.sh
directory=/opt/kippo
stdout_logfile=/opt/kippo/log/kippo.out
stderr_logfile=/opt/kippo/log/kippo.err
autostart=true
autorestart=true
redirect_stderr=true
stopsignal=KILL
user=kippo
stopasgroup=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment