Linux_異常_08_本機無法訪問虛擬機web等工程

這是因為防火墻的原因,把響應端口開啟就行了。

?

?

? # Firewall configuration written by system-config-firewall
? # Manual customization of this file is not recommended.

*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT#mysql port
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT#nginx
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT#tomcat
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 5005 -j ACCEPT#ssh port 
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT#vsftpd
-A INPUT  -m state --state NEW -m tcp -p tcp --dport 61001:62000 -j ACCEPT
-A OUTPUT -m state --state NEW -m tcp -p tcp --sport 61001:62000 -j ACCEPT
-A INPUT  -m state --state NEW -m tcp -p tcp --dport 20 -j ACCEPT
-A OUTPUT -m state --state NEW -m tcp -p tcp --sport 20 -j ACCEPT
-A INPUT  -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT
-A OUTPUT -m state --state NEW -m tcp -p tcp --sport 21 -j ACCEPT-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT

?

?

?

二、參考文件

1.Centos6.8 防火墻設置

2.CentOS 6上 iptables 防火墻的基本配置教程

3.為CentOS 6設置IPTables防火墻

4.Centos6.8防火墻配置

5.CentOS7安裝iptables防火墻

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/391984.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/391984.shtml
英文地址,請注明出處:http://en.pswp.cn/news/391984.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

Building a WAMP Dev Environment [3/4] - Installing and Configuring PHP

Moved to http://blog.tangcs.com/2008/10/27/wamp-installing-configuring-php/轉載于:https://www.cnblogs.com/WarrenTang/archive/2008/10/27/1320069.html

ipywidgets_未來價值和Ipywidgets

ipywidgetsHow to use Ipywidgets to visualize future value with different interest rates.如何使用Ipywidgets可視化不同利率下的未來價值。 There are some calculations that even being easy becoming better with a visualization of his terms. Moreover, the sooner…

2019 css 框架_宣布CSS 2019調查狀態

2019 css 框架by Sacha Greif由Sacha Greif 宣布#StateOfCSS 2019調查 (Announcing the #StateOfCSS 2019 Survey) 了解JavaScript狀況之后,幫助我們確定最新CSS趨勢 (After the State of JavaScript, help us identify the latest CSS trends) I’ve been using C…

計算機主機后面輻射大,電腦的背面輻射大嗎

眾所周知,電子產品的輻射都比較大,而電腦是非常常見的電子產品,它也存在著一定的輻射,那么電腦的背面輻射大嗎?下面就一起隨佰佰安全網小編來了解一下吧。有資料顯示,電腦后面的輻射比前面大,長期近距離在…

spring— Bean標簽scope配置和生命周期配置

scope配置 singleton 默認值,單例的prototype 多例的request WEB 項目中,Spring 創建一個 Bean的對象,將對象存入到 request 域中session WEB 項目中,Spring 創建一個 Bean 的對象,將對象存入session 域中global sess…

裝飾器3--裝飾器作用原理

多思考,多記憶!!! 轉載于:https://www.cnblogs.com/momo8238/p/7217345.html

用folium模塊畫地理圖_使用Folium表示您的地理空間數據

用folium模塊畫地理圖As a part of the Data Science community, Geospatial data is one of the most crucial kinds of data to work with. The applications are as simple as ‘Where’s my food delivery order right now?’ and as complex as ‘What is the most optim…

Windows下安裝Python模塊時環境配置

“Win R”打開cmd終端,如果直接在里面使用pip命令的時候,要么出現“syntax invalid”,要么出現: pip is not recognized as an internal or external command, operable program or batch file. 此時需要將C:\Python27\Scripts添加…

播客2008

http://blog.tangcs.com/2008/12/29/year-2008/轉載于:https://www.cnblogs.com/WarrenTang/articles/1364465.html

linear在HTML的作用,CSS3里的linear-gradient()函數

linear-gradient() 函數用于創建一個線性漸變的 "圖像"。為了創建一個線性漸變,你需要設置一個起始點和一個方向(指定為一個角度)的漸變效果。你還要定義終止色。終止色就是你想讓Gecko去平滑的過渡,并且你必須指定至少兩種,當然也…

golang底層深入_帶有Golang的GraphQL:從基礎到高級的深入研究

golang底層深入by Ridham Tarpara由里德姆塔帕拉(Ridham Tarpara) 帶有Golang的GraphQL:從基礎到高級的深入研究 (GraphQL with Golang: A Deep Dive From Basics To Advanced) GraphQL has become a buzzword over the last few years after Facebook made it ope…

spring—Bean實例化三種方式

1&#xff09; 使用無參構造方法實例化 它會根據默認無參構造方法來創建類對象&#xff0c;如果bean中沒有默認無參構造函數&#xff0c;將會創建失敗 <?xml version"1.0" encoding"UTF-8"?> <beans xmlns"http://www.springframework.o…

bzoj 3439: Kpm的MC密碼

Description 背景 想Kpm當年為了防止別人隨便進入他的MC&#xff0c;給他的PC設了各種奇怪的密碼和驗證問題&#xff08;不要問我他是怎么設的。。。&#xff09;&#xff0c;于是乎&#xff0c;他現在理所當然地忘記了密碼&#xff0c;只能來解答那些神奇的身份驗證問題了。。…

python創建類統計屬性_輕松創建統計數據的Python包

python創建類統計屬性介紹 (Introduction) Sometimes you may need a distribution figure for your slide or class. Since you are not using data, you want a quick solution.有時&#xff0c;您的幻燈片或課程可能需要一個分配圖。 由于您不使用數據&#xff0c;因此需要快…

pytorch深度學習_在本完整課程中學習在PyTorch中應用深度學習

pytorch深度學習In this complete course from Fawaz Sammani you will learn the key concepts behind deep learning and how to apply the concepts to a real-life project using PyTorch. 在Fawaz Sammani的完整課程中&#xff0c;您將學習深度學習背后的關鍵概念&#x…

html讓a標簽左右一樣寬,button和a標簽設置相同的css樣式,但是寬度不同

登錄注冊.btn {display: block;-moz-appearance: none;background: rgba(0, 0, 0, 0) none repeat scroll 0 0;border-radius: 0.25rem;box-sizing: border-box;cursor: pointer;font-family: inherit;font-size: 0.8rem;height: 2rem;line-height: 1.9rem;margin: 0;padding: …

淺析STM32之usbh_def.H

【溫故而知新】類似文章淺析USB HID ReportDesc (HID報告描述符) 現在將en.stm32cubef1\STM32Cube_FW_F1_V1.4.0\Middlewares\ST\STM32_USB_Host_Library\Core\Inc\usbh_def.H /********************************************************************************* file us…

spring—依賴注入

依賴注入&#xff08;Dependency Injection&#xff09; 它是 Spring 框架核心 IOC 的具體實現。 在編寫程序時&#xff0c;通過控制反轉&#xff0c;把對象的創建交給了 Spring&#xff0c;但是代碼中不可能出現沒有依賴的情況。 IOC 解耦只是降低他們的依賴關系&#xff0c;…

C# (類型、對象、線程棧和托管堆)在運行時的相互關系

在介紹運行時的關系之前,先從一些計算機基礎只是入手,如下圖: 該圖展示了已加載CLR的一個windows進程,該進程可能有多個線程,線程創建時會分配到1MB的棧空間.棧空間用于向方法傳遞實參,方法定義的局部變量也在實參上,上圖的右側展示了線程的棧內存,棧從高位內存地址向地位內存地…

2019-08-01 紀中NOIP模擬賽B組

T1 [JZOJ2642] 游戲 題目描述 Alice和Bob在玩一個游戲&#xff0c;游戲是在一個N*N的矩陣上進行的&#xff0c;每個格子上都有一個正整數。當輪到Alice/Bob時&#xff0c;他/她可以選擇最后一列或最后一行&#xff0c;并將其刪除&#xff0c;但必須保證選擇的這一行或這一列所有…