Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue Nov 18, 2014 4:58 pm 
Offline
Senior Member

Joined: Fri May 02, 2014 5:20 pm
Posts: 58
Website: http://www.sturmkrieg.ru
Location: Richmond
I have a linode for running vulnerable websites and services for testing. I have set iptables to require use of a proxy linode to access the linode.

Will this restrict all access to the linode to the one IP address?

Code:
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -d 127.0.0.0/8 -j REJECT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A OUTPUT -j ACCEPT

iptables -A INPUT -s 173.255.192.138 -j ACCEPT

iptables -A INPUT -j DROP
iptables -A FORWARD -j DROP


Top
   
PostPosted: Tue Nov 18, 2014 7:03 pm 
Offline
Senior Member

Joined: Thu Feb 20, 2014 5:06 pm
Posts: 58
That depends on what rules existed in the INPUT chain before those commands are executed. The "iptables -A" command appends the rule to the given chain, so rules that existed earlier will be processed first. Remember that iptables rules are processed sequentially, so order matters.

Run "iptables -L -n" to get a complete dump of all chains and post the result here.

Oh, and you should always test using "nmap <ip_here>" from both 173.255.192.138 and an external IP to ensure it actually works.


Top
   
PostPosted: Tue Nov 18, 2014 11:23 pm 
Offline
Senior Member

Joined: Fri May 02, 2014 5:20 pm
Posts: 58
Website: http://www.sturmkrieg.ru
Location: Richmond
I'm using nmap from another linode, and it seems to think it is down. Sounds like it's working.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group