Operations grimoire/DevCentral: Difference between revisions

From Nasqueron Agora
(Created page with "DevCentral is the name of our Phabricator instance. == Troubleshoot == === devcentral.nasqueron.org port 5022: Connection refused === <code> $ git push ssh: connect to host...")
 
Line 14: Line 14:
* if the IP changed, check with <code>iptables -t nat -L PREROUTING</code> an old entry (5022 is "mice"):
* if the IP changed, check with <code>iptables -t nat -L PREROUTING</code> an old entry (5022 is "mice"):
** To remove the old: <code>iptables -t nat -D PREROUTING -i ens192 -p TCP -d 212.129.32.223/32 --dport 5022 -j DNAT --to-destination 172.17.0.139:22</code>
** To remove the old: <code>iptables -t nat -D PREROUTING -i ens192 -p TCP -d 212.129.32.223/32 --dport 5022 -j DNAT --to-destination 172.17.0.139:22</code>
** To add the new: <code>iptables -t nat -I PREROUTING -i ens192 -p TCP -d 212.129.32.223/32 --dport 5022 -j DNAT --to-destination 172.17.0.139:22</code>
** To add the new: <code>iptables -t nat -I PREROUTING -i ens192 -p TCP -d 212.129.32.223/32 --dport 5022 -j DNAT --to-destination 172.17.0.5:22</code>
** To check the rules: <code>iptables -t nat -L PREROUTING | grep mice</code>
** To check the rules: <code>iptables -t nat -L PREROUTING | grep mice</code>

Revision as of 21:32, 22 July 2016

DevCentral is the name of our Phabricator instance.

Troubleshoot

devcentral.nasqueron.org port 5022: Connection refused

$ git push ssh: connect to host devcentral.nasqueron.org port 5022: Connection refused fatal: Could not read from remote repository.

That requires two things:

  • a SSH server launched on the port 22 of the devcentral Docker container, to serve repositories (not a staging area): http://pad.wolfplex.be/p/DevCentral
  • an iptables rule to forward ports: iptables -t nat -I PREROUTING -i ens192 -p TCP -d 212.129.32.223/32 --dport 5022 -j DNAT --to-destination 172.17.0.5:22
  • if the IP changed, check with iptables -t nat -L PREROUTING an old entry (5022 is "mice"):
    • To remove the old: iptables -t nat -D PREROUTING -i ens192 -p TCP -d 212.129.32.223/32 --dport 5022 -j DNAT --to-destination 172.17.0.139:22
    • To add the new: iptables -t nat -I PREROUTING -i ens192 -p TCP -d 212.129.32.223/32 --dport 5022 -j DNAT --to-destination 172.17.0.5:22
    • To check the rules: iptables -t nat -L PREROUTING | grep mice