{"id":2041,"date":"2012-09-14T01:13:45","date_gmt":"2012-09-14T00:13:45","guid":{"rendered":"http:\/\/blog.ed.gs\/?p=2041"},"modified":"2012-09-14T01:13:45","modified_gmt":"2012-09-14T00:13:45","slug":"delete-iptables-rules-by-line-number","status":"publish","type":"post","link":"https:\/\/ed.gs\/2012\/09\/14\/delete-iptables-rules-by-line-number\/","title":{"rendered":"Delete IPTables Rules By Line Number"},"content":{"rendered":"
IPTables on some Linux distros add’s a load of random crap as default. We had a server that would die if you flushed it so I had to find out a way of removing by chain number instead.<\/p>\n
First off list all IPTable’s rules by chain number:<\/p>\n
iptables -vnL --line-numbers<\/pre>\nThen delete the line you want:<\/p>\n
iptables -D INPUT 22<\/pre>\nThis will delete chain line number 22<\/p>\n","protected":false},"excerpt":{"rendered":"
IPTables on some Linux distros add’s a load of random crap as default. We had a server that would die if you flushed it so I had to find out a way of removing by chain number instead. First off list all IPTable’s rules by chain number: iptables -vnL –line-numbers Then delete the line you […]<\/p>\n","protected":false},"author":2,"featured_media":3538,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ep_exclude_from_search":false},"categories":[34,41],"tags":[],"yoast_head":"\n
Delete IPTables Rules By Line Number - E<\/title>\n\n\n\n\n\n\n\n\n\n\n\t\n\t\n\t\n\n\n\t\n