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,250 points

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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,520 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,000 points

edited May 31, 2018 by ajs3033 22 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
• 35,750 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
• 35,750 points
0 votes
1 answer
0 votes
1 answer
+13 votes
2 answers
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,520 points

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.