...
Save the .bashrc file and exit (:wq)
10. Setup the firewall rules (iptables) and open up the ports for SQL*Net (1521) and for Dbvisit Replicate (7901, 7902).
No Format |
---|
vi /etc/sysconfig/iptables |
a. Add the following entries.
No Format |
---|
-A INPUT -m state --state NEW -m tcp -p tcp --dport 1521 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 7901 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 7902 -j ACCEPT |
The whole file should look like.
No Format |
---|
# 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
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 1521 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 7901 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 7902 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT |
b. Save and quit the file (:wq!).
11. Restart the firewall (iptables).
No Format |
---|
[root@source ~]# service iptables restart |
12. The output is.
No Format |
---|
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
iptables: Applying firewall rules: [ OK ] |