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,510 points
45 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,810 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 30 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
• 40,460 points
70 views
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
• 40,460 points
33 views
0 votes
1 answer
0 votes
2 answers
+13 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 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
152 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,810 points
327 views