Remove my server IP in iptables on ubuntu

0 votes

I can't access my second server because my first server blocked my second server IP. If I run the IP:

iptables -L -N | grep             this comes up:

ACCEPT     all  --
REJECT     all  --            reject-with icmp-port-unreachable

the is the server IP. I have only two rules i.e. to ACCEPT and REJECT for this IP. I want to give access to my server IP from iptables and prevent it from blocking my IP.

Jul 18, 2018 in Other DevOps Questions by Damon Salvatore
• 5,980 points

1 answer to this question.

0 votes

Do this to replay the issue

iptables -A INPUT -s -j ACCEPT
iptables -A INPUT -s -j REJECT
iptables -P INPUT DROP

But this won't block and the first rule hit will be accept. You're sharing the output that's got the IP you're interested in and I can't really see why your rules will blocking it.

You can insert another rule at first position which will resolve your issues but without seeing your rules I can't say that it is the best way to solve your issue

iptables -I INPUT 1 -s -j ACCEPT

answered Jul 18, 2018 by DareDev
• 6,890 points

Related Questions In Other DevOps Questions

0 votes
1 answer

Setting up CICD on a local server

As to how to integrate git repo ...READ MORE

answered May 31, 2018 in Other DevOps Questions by ajs3033
• 7,280 points

edited May 31, 2018 by ajs3033 216 views
0 votes
1 answer

Capistrano deploy error saying "end of file reached" while deploying to Ubuntu server

Seems like Capistrano can't connect to the server ...READ MORE

answered Jul 3, 2018 in Other DevOps Questions by Kalgi
• 52,370 points
0 votes
1 answer

how do i make apache2 site point outside the folder in ubuntu?

in apche2 configuration file u have to ...READ MORE

answered Jul 6, 2018 in Other DevOps Questions by Kalgi
• 52,370 points
0 votes
1 answer

How do I install maven on ubuntu?

Hey @Kiran, Installing Maven on Ubuntu is ...READ MORE

answered Feb 19, 2019 in Other DevOps Questions by Jobin
0 votes
2 answers
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
0 votes
1 answer

How to get issues count based on rules in a sonar project?

There are API docs in the footer ...READ MORE

answered May 4, 2018 in Other DevOps Questions by DareDev
• 6,890 points