「iptables」タグアーカイブ

serversman@vpsでgithub使おうと思ったらエラーが( ゚Д゚)

ServersMan@VPSのCentOS 6.xを使っていて、githubからクローンを作ろうと思ったら何かエラーが発生してどうにもならない・・・

Initialized empty Git repository in /var/lib/redmine/plugins/redmine_backlogs/.git/
error: Couldn't resolve host 'github.com' while accessing https://github.com/backlogs/redmine_backlogs.git/info/refs

おろおろしていて、iptablesで制限掛かっているのかな?とか考えて、一度iptablesを止めてみたりしたのだが改善されない。

うーん((+_+))と悩んでいると、resolv.confの設定が何やら怪しい(~_~メ)

ふと覗いてみると、無い・・・設定が・・・

nameserverの設定が成されていないじゃないか!!

よく今まで何か取ってこれていたなぁ~とか思いながら、調べてみたがどこを設定すれば良いのか解らない。

DNSサーバあるよなぁ~とか思ったり、某社のDNSサーバを設定するか・・・とか思いながら、思い出した!
以前にもこんなことがあって、resolv.confの設定をやった記憶が・・・・

絶対忘れていると、過去に設定したマシンの/etc/resolv.confを覗いてみた。

ありましたよ\(^o^)/

nameserver 202.216.224.30

これが無いとダメなのねw

redmineでbacklogs pluginを追加しようとして悩んだ挙句、結果はこんな寂しい原因でした。

redmineのpluginsに移動して、叩いたら行けました。

#git clone https://github.com/backlogs/redmine_backlogs.git
Initialized empty Git repository in /var/lib/redmine/plugins/redmine_backlogs/.git/
remote: Counting objects: 22229, done.
remote: Total 22229 (delta 0), reused 0 (delta 0), pack-reused 22228
Receiving objects: 100% (22229/22229), 11.00 MiB | 1.67 MiB/s, done.
Resolving deltas: 100% (14057/14057), done.

良かった\(^o^)/

service iptables save がCentOS 7で出来ない( ゚Д゚)

CentOS 7を使い始めて、iptablesの設定をしようとゴチャゴチャ・・・

# service iptables save
The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl.

出来ない!systemctl使えって言ってるよ!!

調べてみたら、なんかこんな感じで使える様になるらしいw

[root@localhost ~]# yum install iptables-services
読み込んだプラグイン:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: ftp.riken.jp
 * epel: ftp.riken.jp
 * extras: ftp.riken.jp
 * updates: ftp.riken.jp
依存性の解決をしています
--> トランザクションの確認を実行しています。
---> パッケージ iptables-services.x86_64 0:1.4.21-16.el7 を インストール
--> 依存性解決を終了しました。

依存性を解決しました

================================================================================
 Package                  アーキテクチャー
                                        バージョン            リポジトリー
                                                                           容量
================================================================================
インストール中:
 iptables-services        x86_64        1.4.21-16.el7         base         50 k

トランザクションの要約
================================================================================
インストール  1 パッケージ

総ダウンロード容量: 50 k
インストール容量: 24 k
Is this ok [y/d/N]: y
Downloading packages:
iptables-services-1.4.21-16.el7.x86_64.rpm                 |  50 kB   00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  インストール中          : iptables-services-1.4.21-16.el7.x86_64          1/1
  検証中                  : iptables-services-1.4.21-16.el7.x86_64          1/1

インストール:
  iptables-services.x86_64 0:1.4.21-16.el7

完了しました!
[root@localhost ~]# service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables:[  OK  ]
[root@localhost ~]#

無事完了!
結局、コマンドをそのまま使える様に、以下をインストールするだけということですね。

yum install iptables-services

それもあるのですが、centOS 7からfirewalldに移行していますので、なるべくそちらへ移行することが望ましいです。