Gun Control in Halacha
(א) אִם־בַּמַּחְתֶּ֛רֶת יִמָּצֵ֥א הַגַּנָּ֖ב וְהֻכָּ֣ה וָמֵ֑ת אֵ֥ין ל֖וֹ דָּמִֽים׃
(1) If the thief is seized while tunneling, and he is beaten to death, there is no bloodguilt in his case.

בא להרגך השכם להרגו

If one comes to kill you, kill him first.

(טו) וְנִשְׁמַרְתֶּ֥ם מְאֹ֖ד לְנַפְשֹׁתֵיכֶ֑ם כִּ֣י לֹ֤א רְאִיתֶם֙ כָּל־תְּמוּנָ֔ה בְּי֗וֹם דִּבֶּ֨ר ה' אֲלֵיכֶ֛ם בְּחֹרֵ֖ב מִתּ֥וֹךְ הָאֵֽשׁ׃
(15) For your own sake, therefore, be most careful—since you saw no shape when the LORD your God spoke to you at Horeb out of the fire—
(יד) לֹא־תְקַלֵּ֣ל חֵרֵ֔שׁ וְלִפְנֵ֣י עִוֵּ֔ר לֹ֥א תִתֵּ֖ן מִכְשֹׁ֑ל וְיָרֵ֥אתָ מֵּאֱלֹקֶ֖יךָ אֲנִ֥י ה'
(14) You shall not insult the deaf, or place a stumbling block before the blind. You shall fear your God: I am the LORD.
(ח) כִּ֤י תִבְנֶה֙ בַּ֣יִת חָדָ֔שׁ וְעָשִׂ֥יתָ מַעֲקֶ֖ה לְגַגֶּ֑ךָ וְלֹֽא־תָשִׂ֤ים דָּמִים֙ בְּבֵיתֶ֔ךָ כִּֽי־יִפֹּ֥ל הַנֹּפֵ֖ל מִמֶּֽנּוּ׃ (ס)
(8) When you build a new house, you shall make a parapet for your roof, so that you do not bring bloodguilt on your house if anyone should fall from it.

ועוד תניא אין מוכרין להם לא זיין ולא כלי זיין ואין משחיזין להן את הזיין ואין מוכרין להן לא סדן ולא קולרין ולא כבלים ולא שלשלאות של ברזל אחד עובד כוכבים ואחד כותי ...

א"ר דימי בר אבא כדרך שאסור למכור לעובד כוכבים אסור למכור ללסטים ישראל ה"ד אי דחשיד דקטיל פשיטא היינו עובד כוכבים ואי דלא קטיל אמאי לא לעולם דלא קטיל והב"ע במשמוטא דזימנין דעביד לאצולי נפשיה תנו רבנן אין מוכרין להן תריסין וי"א מוכרין להן תריסין מ"ט אילימא משום דמגנו עלייהו אי הכי אפילו חיטי ושערי נמי לא אמר רב אי אפשר ה"נ איכא דאמרי תריסין היינו טעמא דלא דכי שלים זינייהו קטלי בגוייהו ויש אומרים מוכרים להם תריסין דכי שלים זינייהו מערק ערקי אמר רב נחמן אמר רבה בר אבוה הלכה כיש אומרים אמר רב אדא בר אהבה אין מוכרין להן עששיות של ברזל מ"ט משום דחלשי מינייהו כלי זיין אי הכי אפילו מרי וחציני נמי אמר רב זביד בפרזלא הינדואה והאידנא דקא מזבנינן א"ר אשי לפרסאי דמגנו עילוון:

And furthermore, it is taught in a baraita: One may not sell weapons to gentiles or the auxiliary equipment of weapons, and one may not sharpen weapons for them. And one may not sell them stocks used for fastening the feet of prisoners, or iron neck chains [kolarin], or foot chains, or iron chains. This prohibition applies equally to both a gentile and a Samaritan...

Apropos the baraita that discusses the prohibition against selling weapons, the Gemara relates that Rav Dimi bar Abba says: Just as it is prohibited to sell to a gentile, it is prohibited to sell to an armed bandit who is a Jew. The Gemara clarifies: What are the circumstances of this prohibition? If the thief is suspected of killing, isn’t it obvious that it is prohibited? After all, he is the same as a gentile. Providing a Jew who might kill with weapons is no different from giving a weapon to a gentile, as in both cases one violates the prohibition: Do not place a stumbling block before the blind. And if he is a bandit who does not kill, why not sell to him? The Gemara answers: Actually, Rav Dimi bar Abba is referring to a bandit who does not kill, and here we are dealing with a bandit who steals, as sometimes he makes use of his weapon to save himself when he is caught. Consequently, it is prohibited to sell him weapons in case he kills with them in self-defense. § The Sages taught: One may not sell shields [terisin] to gentiles, despite the fact that they are used for protection, not to attack others. And some say: One may sell shields to them. The Gemara asks: What is the reason behind the opinion that prohibits selling shields to gentiles? If we say it is because they protect them in wartime, if so, then even wheat and barley should not be sold to them. Rav said: If it were possible to avoid selling produce to gentiles without incurring their animosity, indeed it would be prohibited to sell them. Since limiting sales to gentiles to such an extent would cause great harm, it is only prohibited to sell them shields. There are those who say: With regard to shields, this is the reason that one is not allowed to sell them to gentiles: As when their use of their weapon is finished in battle, they kill with these shields. And accordingly, the reason that some say in the baraita that one may sell shields to them is because they maintain that this is not a concern, as when their weapon is finished they flee, rather than use their shield as a weapon. Rav Naḥman says that Rabba bar Avuh says: The halakha is in accordance with the opinion cited as: Some say. Rav Adda bar Ahava says: One may not sell blocks [ashashiot] of iron to gentiles. What is the reason? It is because they forge weapons from them. The Gemara asks: If so, then even hoes and axes should not be sold to them, as they too can be used to forge weapons. Rav Zevid said in response: The ruling of Rav Adda bar Ahava was stated with regard to Indian iron, which is of a superior quality and used only for crafting weapons. The Gemara clarifies: And as for the fact that nowadays we do sell all weapons, Rav Ashi said: We sell the weapons to the Persians, who protect us.

שלשלאות - פרוי"ש וכל הנך משום דלא ליזקו בהו ישראל:
לעובד כוכבים מזבין ליה לישראל לא מזבין כו' - ובמסקנא מסקינן דאסור למזבן לישראל חשוד וא"ת מאי שנא מלפני דלפני דלעיל (דף יד.) וי"ל דהתם מיירי בעובד כוכבים שאינו מוזהר על לפני עור לפיכך אין אנו חוששין אם העובד כוכבים ימכור לחבירו אבל הכא דמיירי בישראל החשוד אנו מוזהרין שלא יבא שום ישראל לידי תקלה על ידינו הר"ר אלחנן ועוד דחד לפני הוא שלא יחטא ישראל בשאלה ושכירות ונסיוני:

(א) אין מוכרין להם דובים וכו':
כל דבר שיש בו נזק לרבים כגון כלי מלחמה כולן וכלי יסורין כגון שלשלאות וכבלי ברזל וצינוקי' וכמו כן אין מתקנין להם כלי מלחמה ואין מלטשין להם החרבות והרמחים וכיוצא בהם שלא לעזור המשחיתין בארץ להשחית:

(ח) כְּשֵׁם שֶׁאֵין מוֹכְרִין לְעוֹבֵד כּוֹכָבִים דְּבָרִים שֶׁמַּחֲזִיקִין בָּהֶן יְדֵיהֶן לַעֲבוֹדַת כּוֹכָבִים כָּךְ אֵין מוֹכְרִין לָהֶם דָּבָר שֶׁיֵּשׁ בּוֹ נֵזֶק לָרַבִּים כְּגוֹן דֻּבִּים וַאֲרָיוֹת וּכְלֵי זַיִן וּכְבָלִים וְשַׁלְשְׁלָאוֹת. וְאֵין מַשְׁחִיזִין לָהֶם אֶת הַזַּיִן. וְכָל שֶׁאָסוּר לְמָכְרוֹ לְעוֹבֵד כּוֹכָבִים אָסוּר לְמָכְרוֹ לְיִשְׂרָאֵל הֶחָשׁוּד לִמְכֹּר לְעוֹבֵד כּוֹכָבִים. וְכֵן אָסוּר לִמְכֹּר כְּלֵי נֵזֶק לְיִשְׂרָאֵל לִסְטִים:

(ט) הָיוּ יִשְׂרָאֵל שׁוֹכְנִים בֵּין הָעוֹבְדֵי כּוֹכָבִים וְכָרְתוּ לָהֶם בְּרִית מֻתָּר לִמְכֹּר כְּלֵי זַיִן לְעַבְדֵי הַמֶּלֶךְ וְגֵיסוֹתָיו מִפְּנֵי שֶׁעוֹשִׂים בָּהֶם מִלְחָמָה עִם צָרֵי הַמְּדִינָה לְהַצִּילָהּ וְנִמְצְאוּ מְגִנִּים עָלֵינוּ שֶׁהֲרֵי אָנוּ שְׁרוּיִין בְּתוֹכָם. עִיר שֶׁיֵּשׁ בָּהּ עֲבוֹדַת כּוֹכָבִים מֻתָּר לְהַלֵּךְ חוּצָה לָהּ וְאָסוּר לְהִכָּנֵס בְּתוֹכָהּ. הָיָה חוּצָה לָהּ עֲבוֹדַת כּוֹכָבִים מֻתָּר לְהַלֵּךְ בְּתוֹכָהּ:

(8) Even as it is forbidden to sell to idolaters things which uphold their hands to idolatry so it is forbidden to sell them things wherein there is a menace to the public, for instance, bears, lions, weapons, iron fetters, and chains; it is likewise forbidden to sharpen their weapons for them. And, everything which is forbidden to sell to an idolater is also forbidden to sell to an Israelite who is under suspicion that he might resell it to an idolater. It is likewise forbidden to sell instruments of harm to robbers who profess to be Israelites.

(9) Israelites living among idolatrous neighbors, with whom they made a covenant of peace, are permitted to sell weapons to the king's servants and militia, because they conduct war therewith against the country's enemies to save it, as a consequence whereof they protect the Israelites who dwell among them. A city wherein there is an established house of idolatry, one is permitted to pass by it without its boundaries, but is forbidden to enter it; if the idolatry is established without its boundaries he may enter it.

(יב) אָסוּר לִמְכֹּר לְעַכּוּ''ם כָּל כְּלֵי הַמִּלְחָמָה וְאֵין מַשְׁחִיזִין לָהֶם אֶת הַזַּיִן וְאֵין מוֹכְרִין לָהֶן לֹא סַכִּין וְלֹא קוֹלָרִין וְלֹא כְּבָלִים [שֶׁל בַּרְזֶל] וְלֹא שַׁלְשְׁלָאוֹת שֶׁל בַּרְזֶל הִינְדּוּאָה וְלֹא דֻּבִּים וַאֲרָיוֹת וְלֹא כָּל דָּבָר שֶׁיֵּשׁ בּוֹ נֵזֶק לָרַבִּים. אֲבָל מוֹכְרִין לָהֶן תְּרִיסִין שֶׁאֵינָן אֶלָּא לְהָגֵן:

(יג) וּכְשֵׁם שֶׁאָסְרוּ לִמְכֹּר לְעַכּוּ''ם כָּךְ אָסְרוּ לִמְכֹּר לְיִשְׂרָאֵל שֶׁמּוֹכֵר לְעַכּוּ''ם. וּמֻתָּר לִמְכֹּר כְּלֵי זַיִן לְחַיִל שֶׁל בְּנֵי הַמְּדִינָה מִפְּנֵי שֶׁהֵן מְגִנִּין עַל יִשְׂרָאֵל:

(12) It is forbidden to sell arms of any kind to heathen ; one should not sharpen their weapons; one should not sell them a knife — — or anything that is likely to be a public danger. Shields, however, may be sold to them, since they are used only for defense.

(13) Just as the sages have prohibited the sale of arms to a heathen, so have they prohibited selling the same to a Jew who sells to a heathen. On the other hand, weapons may be sold to the local citizens' force, since they protect the Jewish population.

(ה) אֵין מוֹכְרִים לָהֶם וְלֹא לְיִשְׂרָאֵל הֶחָשׁוּד לִמְכֹּר לָהֶם, וְלֹא לְיִשְׂרָאֵל לִסְטִים, דָּבָר שֶׁיֵּשׁ בּוֹ נֶזֶק לָרַבִּים כְּגוֹן דֻּבִּים וַאֲרָיוֹת, וְלֹא שׁוּם כְּלֵי זַיִן, וְלֹא סַדָּן. שטא''ק בִּלְשׁוֹן אַשְׁכְּנַז כֵּן פֵּרֵשׁ רַשִׁ''י בַּעֲבוֹדָה זָרָה דַּף ט''ו, וְלֹא כְּבָלִים וְקוֹלָרִין (פֵּרוּשׁ מֵעִנְיַן וַיִּתְּנֻהוּ בַסוּגַר (יְחֶזְקֵאל יט, ט) וְיַהֲבוּהוּ בְּקוֹלָרִין (פֵּרוּשׁ בַּרְזֶל סְבִיב הַצַוָּאר) וְשַׁלְשְׁלָאוֹת שֶׁל בַּרְזֶל, וַאֲפִלּוּ עֶשֶׁת שֶׁל בַּרְזֶל; וְלֹא מַשְׁחִיזִים לָהֶם כְּלִי זַיִן; וְלֹא בּוֹנִים לָהֶם מָקוֹם שֶׁדָּנִים בּוֹ בְּנֵי אָדָם.

(ו) הָיוּ יִשְׂרָאֵל שׁוֹכְנִים בֵּין עוֹבְדֵי כּוֹכָבִים וְכָרְתוּ לָהֶם בְּרִית, מֻתָּר לִמְכֹּר כְּלֵי זַיִן לְעַבְדֵי הַמֶּלֶךְ וּגְיָסוֹתָיו, מִפְּנֵי שֶׁעוֹשִים עִמָּהֶם מִלְחָמָה עִם צָרֵי הַמְּדִינָה, לְהַצִּילָהּ, וְנִמְצְאוּ מְגִנִּים עֲלֵיהֶם, שֶׁהֲרֵי הֵם שְׁרוּיִים בְּתוֹכָהּ.

כדתניא ר' נתן אומר מניין שלא יגדל אדם כלב רע בתוך ביתו ואל יעמיד סולם רעוע בתוך ביתו שנאמר (דברים כב, ח) ולא תשים דמים בביתך:

As it is taught in a baraita that Rabbi Natan says: From where is it derived that one may not raise a vicious dog in his house, and that one may not set up an unstable ladder in his house? As it is stated: “You shall not bring blood into your house” (Deuteronomy 22:8), which means that one may not allow a hazardous situation to remain in his house.

(ט) וְכֵן אָסְרוּ חֲכָמִים לְגַדֵּל חֲזִירִים בְּכָל מָקוֹם. וְלֹא אֶת הַכֶּלֶב אֶלָּא אִם כֵּן הָיָה קָשׁוּר בְּשַׁלְשֶׁלֶת. אֲבָל מְגַדֵּל הוּא כְּלָבִים בָּעִיר הַסְּמוּכָה לַסְּפָר. בַּיּוֹם קוֹשְׁרוֹ וּבַלַּיְלָה מַתִּירוֹ. וְאָמְרוּ חֲכָמִים אָרוּר מְגַדֵּל כְּלָבִים וַחֲזִירִים מִפְּנֵי שֶׁהֶזֵּקָן מְרֻבֶּה וּמָצוּי:

(9) The sages also prohibited the breeding of swine in any place, or of dogs, unless they are chained. One may, however, breed dogs in a town near the border. A dog should be tied up by day and untied at night. The sages said: "Cursed be the man who breeds dogs or pigs," because the damage they do is substantial and frequent.

(ד) אֶחָד הַגַּג וְאֶחָד כָּל דָּבָר שֶׁיֵּשׁ בּוֹ סַכָּנָה וְרָאוּי שֶׁיִּכָּשֵׁל בָּהּ אָדָם וְיָמוּת. כְּגוֹן שֶׁהָיְתָה לוֹ בְּאֵר אוֹ בּוֹר בַּחֲצֵרוֹ בֵּין שֶׁיֵּשׁ בּוֹ מַיִם בֵּין שֶׁאֵין בּוֹ מַיִם חַיָּב לַעֲשׂוֹת חֻלְיָא גְּבוֹהָה עֲשָׂרָה טְפָחִים. אוֹ לַעֲשׂוֹת לָהּ כִּסּוּי כְּדֵי שֶׁלֹּא יִפּל בָּהּ אָדָם וְיָמוּת. וְכֵן כָּל מִכְשׁל שֶׁיֵּשׁ בּוֹ סַכָּנַת נְפָשׁוֹת מִצְוַת עֲשֵׂה לַהֲסִירוֹ וּלְהִשָּׁמֵר מִמֶּנּוּ וּלְהִזָּהֵר בַּדָּבָר יָפֶה יָפֶה. שֶׁנֶּאֱמַר (דברים ד ט) "הִשָּׁמֶר לְךָ וּשְׁמֹר נַפְשְׁךָ". וְאִם לֹא הֵסִיר וְהֵנִיחַ הַמִּכְשׁוֹלוֹת הַמְּבִיאִין לִידֵי סַכָּנָה בִּטֵּל מִצְוַת עֲשֵׂה וְעָבַר בְּ(דברים כב ח) "לֹא תָשִׂים דָּמִים":

(4) There is no difference between a roof or anything else that is dangerous and likely to cause death to a person who might stumble. If, for instance, one has a well or a pit in his courtyard — — he must build an enclosing ring ten handbreadths high, or put a cover over it, so that a person should not fall into it and die. So too, any obstruction that is a danger to life must be removed as a matter of positive duty and extremely necessary caution.

(ג) אסור לגדל כלב רע אא"כ הוא אסור בשלשלאות של ברזל וקשור בהם ובעיר הסמוכה לספר מותר לגדלו וקושרו ביום ומתירו בלילה: הגה וי"א דהשתא שאנו שרוין בין העכו"ם ואומות בכל ענין שרי ופוק חזי מאי עמא דבר (הגהת אלפסי החדשים) מיהו נראה אם הוא כלב רע שיש לחוש שיזיק בני אדם דאסור לגדלו אא"כ קשור בשלשלאות של ברזל:

(ח) וכן כל מכשול שיש בו סכנת נפשות מצות עשה להסירו ולהשמר ממנו ולהזהר בדבר יפה שנאמר השמר לך ושמור נפשך ואם לא הסיר והניח המכשולות המביאים לידי סכנה ביטל מצות עשה ועובר בלא תשים דמים:

(8) Likewise, one has a positive duty to remove and guard oneself of any life-threatening obstacle, as it is said "beware and guard your soul". If one did not removed said obstacles, one has cancelled a positive commandment and transgressed "do not bring bloodguilt" (Deut. 22:8).

(ד) לֹא יֵצֵא הָאִישׁ לֹא בְסַיִף, וְלֹא בְקֶשֶׁת, וְלֹא בִתְרִיס, וְלֹא בְאַלָּה, וְלֹא בְרֹמַח. וְאִם יָצָא, חַיָּב חַטָּאת. רַבִּי אֱלִיעֶזֶר אוֹמֵר, תַּכְשִׁיטִין הֵן לוֹ. וַחֲכָמִים אוֹמְרִים, אֵינָן אֶלָּא לִגְנַאי, שֶׁנֶּאֱמַר (ישעיה ב) וְכִתְּתוּ חַרְבוֹתָם לְאִתִּים וַחֲנִיתוֹתֵיהֶם לְמַזְמֵרוֹת, לֹא יִשָּׂא גּוֹי אֶל גּוֹי חֶרֶב וְלֹא יִלְמְדוּ עוֹד מִלְחָמָה.

(4) A man may not go out with a sword, nor with a bow, nor with a shield, nor with a round shield, nor with a spear. If he has gone out [with any of these] he is liable for a Chattat. Rabbi Eliezer says: They are ornaments for him. But the Sages say: They are nothing but an indignity, for it is said, "They shall beat their swords into plowshares, and their spears unto pruning-hooks; nation shall not lift up sword against nation, neither shall they learn war any more" (Isaiah 2:4).

For more on this subject: http://podcast.headlinesbook.com/e/31718-gun-control-in-halacha/