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 xx.xxx.xxx.xx             this comes up:

ACCEPT     all  --  xx.xxx.xxx.xx        0.0.0.0/0
REJECT     all  --  xx.xxx.xxx.xx        0.0.0.0/0            reject-with icmp-port-unreachable

the xx.xxx.xxx.xx 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
874 views

1 answer to this question.

0 votes

Do this to replay the issue

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

But this won't block 10.64.7.109 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 10.64.7.109 -j ACCEPT

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

Related Questions In Other DevOps Questions

0 votes
0 answers

Create query in Azure Devops server filtering on User Stories or tasks

I am having a problem creating a ...READ MORE

Apr 11, 2022 in Other DevOps Questions by Kichu
• 19,050 points
754 views
0 votes
0 answers

How do I add the azure-devops commands to the Azure CLI in an offline on-premise server?

I wanted to add the azure-DevOps extension to the Azure ...READ MORE

Apr 19, 2022 in Other DevOps Questions by Kichu
• 19,050 points
494 views
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,300 points

edited May 31, 2018 by ajs3033 995 views
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
3,940 views
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
2,785 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP