新之助meow

Kratos
专注于用户阅读体验的响应式博客主题
  1. 首页
  2. 未分类
  3. 正文

debian 配置全局代理 安装easyredmine

2016年3月20日 1103点热度 0人点赞 0条评论

easyredmin提供的虚拟机时debian的,带安装脚本,但运行脚本安装是总报各种错,总结起来发现是墙的问题,通过代理安装就可以了。

debian配置全局代理过程

安装 redsocks

 apt-get install redsocks 
配置文件 
base { log_debug = on; log_info = on; log = "file:/tmp/reddi.log"; daemon = on; redirector = iptables; } redsocks { local_ip = 127.0.0.1; local_port = 31338; ip = 127.0.0.1; port = 31337; type = socks5; }

redsocks -c redsocks.conf 就可以运行了

整个数据流的流向是这样的。
你的IP请求 -> iptables -> redsocks(127.0.0.1:31338) -> SOCKS:127.0.0.1:31337 -> 目的地。

ssh -D 31337 root@133.130.59.34

#创建一个叫SOCKS的链

iptables -t nat -N SOCKS

#忽略服务器的地址,如果不属于内网IP的话一定要注意加上.
iptables -t nat -A SOCKS -d 133.130.59.34 -j RETURN
# 忽略本地地址
iptables -t nat -A SOCKS -d 0.0.0.0/8 -j RETURN
iptables -t nat -A SOCKS -d 10.0.0.0/8 -j RETURN
iptables -t nat -A SOCKS -d 127.0.0.0/8 -j RETURN
iptables -t nat -A SOCKS -d 169.254.0.0/16 -j RETURN
iptables -t nat -A SOCKS -d 172.16.0.0/12 -j RETURN
iptables -t nat -A SOCKS -d 192.168.0.0/16 -j RETURN
iptables -t nat -A SOCKS -d 224.0.0.0/4 -j RETURN
iptables -t nat -A SOCKS -d 240.0.0.0/4 -j RETURN
# Anything else should be redirected to shadowsocks's local port

#除上面之外的所有流量都跳转到socks的本地端口(local_port),这里使用shadosock默认端口31338
iptables -t nat -A SOCKS -p tcp -j REDIRECT --to-ports 31338

# 最后是应用上面的规则,将OUTPUT出去的tcp流量全部经过SOCKS链
#如果是在openwrt上实现透明代理的话,使用下面被注释了的规则
#iptables -t nat -A PREROUTING -p tcp -j SOCKS
iptables -t nat -A OUTPUT -p tcp -j SOCKS

iptables -t nat -F

清空iptable 配置


iptables -t nat -vnL

 

执行安装
设置msql root用户密码


use mysql
update user set password='' where user='root';
FLUSH PRIVILEGES;

#执行安装
 bundle exec rake easyproject:install RAILS_ENV=production

 

标签: debian easyredmine redmine 全局代理
最后更新:2016年3月20日

tjccn_wx@hotmail.com

这个人很懒,什么都没留下

点赞
< 上一篇
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

归档

  • 2026 年 10 月
  • 2024 年 2 月
  • 2023 年 7 月
  • 2023 年 1 月
  • 2022 年 10 月
  • 2022 年 9 月
  • 2022 年 6 月
  • 2022 年 4 月
  • 2022 年 3 月
  • 2022 年 2 月
  • 2021 年 11 月
  • 2021 年 10 月
  • 2021 年 9 月
  • 2021 年 1 月
  • 2020 年 12 月
  • 2020 年 11 月
  • 2020 年 10 月
  • 2020 年 9 月
  • 2020 年 7 月
  • 2020 年 6 月
  • 2020 年 5 月
  • 2020 年 4 月
  • 2020 年 3 月
  • 2020 年 2 月
  • 2019 年 10 月
  • 2019 年 8 月
  • 2019 年 7 月
  • 2019 年 4 月
  • 2019 年 3 月
  • 2018 年 12 月
  • 2018 年 11 月
  • 2018 年 10 月
  • 2018 年 6 月
  • 2018 年 5 月
  • 2018 年 4 月
  • 2018 年 3 月
  • 2018 年 2 月
  • 2018 年 1 月
  • 2017 年 12 月
  • 2017 年 11 月
  • 2017 年 10 月
  • 2017 年 9 月
  • 2017 年 8 月
  • 2017 年 7 月
  • 2017 年 6 月
  • 2017 年 5 月
  • 2017 年 4 月
  • 2017 年 3 月
  • 2017 年 2 月
  • 2017 年 1 月
  • 2016 年 12 月
  • 2016 年 11 月
  • 2016 年 10 月
  • 2016 年 9 月
  • 2016 年 8 月
  • 2016 年 7 月
  • 2016 年 6 月
  • 2016 年 5 月
  • 2016 年 4 月
  • 2016 年 3 月
  • 2015 年 12 月
  • 2015 年 8 月

分类

  • android
  • mysql
  • nethunter
  • proxmark
  • 未分类

COPYRIGHT © 2026 新之助meow. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang