Oracle 修改監聽連接埠號碼1521

來源:互聯網
上載者:User

Oracle 修改監聽連接埠號碼1521

在Oracle中,預設的監聽連接埠號碼為1521,一旦有人掃描出這個連接埠號碼就會知道此伺服器為Oracle資料庫伺服器,存在極其大的安全隱患,在這裡,教大家如何修改Oracle預設連接埠號碼為9999:

1、查看監聽狀態

$ lsnrctl status

2、停止監聽
$ lsnrctl stop

3、修改設定檔
$ vi $ORACLE_HOME/network/admin/listener.ora
1521----->9999

4、登入並查看local_listener參數
$ sqlplus / as sysdba
> show parameter local_listener
(這個時候VALUE這個值應該是空的)

5、修改local_listener參數
> alter system set local_listener="(address = (protocol = tcp)(host = 192.168.100.201)(port = 9999))";
#host後面加的主機名稱或者IP

6、查看local_listener參數
> show parameter local_listener

7、啟動監聽
$ lsnrctl start

8、查看狀態
$ netstat -an|grep 9999
$ lsnrctl status

9、防火牆連接埠開放
$ su - root
# /sbin/iptables -I INPUT -p tcp --dport 9999 -j ACCEPT

# /etc/rc.d/init.d/iptables save

到此Oracle的監聽連接埠號碼就已經由原來的1521變成9999

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.