<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>akishin999</author_name>
  <author_url>https://blog.hatena.ne.jp/akishin999/</author_url>
  <blog_title>akishin999の日記</blog_title>
  <blog_url>https://akishin.hatenablog.jp/</blog_url>
  <categories>
    <anon>Linux</anon>
  </categories>
  <description>作業ミスの予防として手元の開発環境から本番環境の MySQL への接続を禁止したくなったのですが、他で使っていたりするのでサーバ側でポートを閉じたりは出来そうにありません。ということで、取りあえずクライアント側で iptables を使って本番サーバの特定ポートとの通信を禁止してみました。root ユーザになり以下のコマンドを実行します。 # iptables -A OUTPUT -p tcp -d 192.0.2.0 --dport 3306 -j REJECT 対象サーバ 192.0.2.0 のポート 3306 に対して送信する tcp パケットを破棄するチェインを追加しています。 DRO…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fakishin.hatenablog.jp%2Fentry%2F20130212%2F1360623241&quot; title=&quot; iptables で他のサーバとの通信を禁止する - akishin999の日記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2013-02-12 07:54:01</published>
  <title> iptables で他のサーバとの通信を禁止する</title>
  <type>rich</type>
  <url>https://akishin.hatenablog.jp/entry/20130212/1360623241</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
