{"id":1570,"date":"2023-12-17T04:33:00","date_gmt":"2023-12-17T02:33:00","guid":{"rendered":"http:\/\/wp.chaoyu.nl\/?p=1570"},"modified":"2024-03-07T23:49:30","modified_gmt":"2024-03-07T22:49:30","slug":"oracle-instance-only-reachable-via-22-no-other-ports-are-reachable-solution","status":"publish","type":"post","link":"https:\/\/chaoyu.nl\/?p=1570","title":{"rendered":"Oracle Instance only reachable via 22 , no other ports are reachable solution"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Recently, when I create a new instance in OCI, i can only reach it via 22. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It is caused by iptables now are install and enabled on default . <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">YOu can choose either remove iptables once for all , or add rules each time when you openning new ports. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I choose to remove it, else what is the point of NSGs at all. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To add ports: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash line-numbers\"># to add ports\nsudo iptables -I INPUT 6 -m state --state NEW -p tcp --dport 80 -j ACCEPT<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash line-numbers\">sudo netfilter-persistent save<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To uninstall iptables: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash line-numbers\">sudo apt remove iptables\nsudo reboot # remember to reboot... <\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently, when I create a new instance in OCI, i can only reach it via 22. It is caused by iptables now are install and enabled on default . YOu can choose either remove iptables once for all , or add rules each time when you openning new ports. I choose to remove it, else&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1570","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/chaoyu.nl\/index.php?rest_route=\/wp\/v2\/posts\/1570","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chaoyu.nl\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chaoyu.nl\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chaoyu.nl\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chaoyu.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1570"}],"version-history":[{"count":7,"href":"https:\/\/chaoyu.nl\/index.php?rest_route=\/wp\/v2\/posts\/1570\/revisions"}],"predecessor-version":[{"id":1676,"href":"https:\/\/chaoyu.nl\/index.php?rest_route=\/wp\/v2\/posts\/1570\/revisions\/1676"}],"wp:attachment":[{"href":"https:\/\/chaoyu.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1570"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chaoyu.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1570"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chaoyu.nl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1570"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}