Sponsored Content
Top Forums UNIX for Advanced & Expert Users iptables ruleset to allow http Post 302907535 by accolito on Sunday 29th of June 2014 04:49:37 PM
Old 06-29-2014
Computer iptables ruleset to allow destination port http/s

Hello gentlemen.
I want to solve a little problem with iptables.

Let's suppose that i've a valid ruleset called MYBLOCK with all ips i want to block.
Code:
$ iptables --list

Chain FORWARD (policy DROP)
DROP       all  --  anywhere             anywhere            set MYBLOCK src,dst

Everything works fine but if I've this ip: 2.2.2.2 in the ruleset I can't access it via browser because I've blocked it (drop). Is there a way to block the ip but allow me to access it via browser (allow destination port 80 and 443)?

ipset v4.5, protocol version 4
iptables v1.3.8

This is the command i use to apply my ruleset:

Code:
$ iptables -I FORWARD -m set --set MYBLOCK src,dst -j DROP

Shortly, I don't know how to make iptable to allow destination port 80. I've tried everything without success Smilie

Please tell me if you need more info.
Thanks in advance for your attention and support.

Last edited by accolito; 06-30-2014 at 02:42 AM.. Reason: sorry vbe, I'll be more careful :-P
 

9 More Discussions You Might Find Interesting

1. Linux

HTTP server

Hello all, Please tell me that how to configure a HTTP server in Fedora Core 3 Also tell me about WEB HOSTING under Linux. (4 Replies)
Discussion started by: jaibw
4 Replies

2. UNIX for Advanced & Expert Users

http

how to downloaad a web page using http server (0 Replies)
Discussion started by: krishnavel
0 Replies

3. UNIX for Dummies Questions & Answers

HTTP request

Can anybody tell about http request processing in shell script..? (3 Replies)
Discussion started by: noufal
3 Replies

4. Shell Programming and Scripting

http and https

Hi friends, I have a local host http://ss3/cgi-bin/page/page_list.cgi running on apache webserver perfectly well. But suddenly, it stopped working and gave an error "Internet explorer Explorer cannot display the webpage". But when i added https, as https://ss3/cgi-bin/page/page_list.cgi the... (2 Replies)
Discussion started by: nmattam
2 Replies

5. Programming

sending http url through http socket programming..

hi am senthil am developing a software to send and receive SMS using HTTP connection first of all am forming a URL and sending that URL to a remote server using my Client Program i send that url through Socket(using Send() Function) if i send more than one URL one by one using the same... (0 Replies)
Discussion started by: senkerth
0 Replies

6. Shell Programming and Scripting

sending http url through http socket programming..

hi am senthil am developing a software to send and receive SMS using HTTP connection first of all am forming a URL and sending that URL to a remote server using my Client Program i send that url through Socket(using Send() Function) if i send more than one URL one by one using the same... (4 Replies)
Discussion started by: senkerth
4 Replies

7. UNIX for Advanced & Expert Users

Sendmail Rewrite Ruleset

Hi all, I like to write a rule which do the following: INPUT ADDRESS REWRITTEN TO ----------------------------- ----------------------------- foo.bar@sub.domain.com bar@domain.com foo@othersub.domain.com ... (1 Reply)
Discussion started by: bashily
1 Replies

8. Web Development

HTTP Headers Reference: HTTP Status-Codes

Hypertext Transfer Protocol -- HTTP/1.1 for Reference - HTTP Headers 10 Status Code Definitions Each Status-Code is described below, including a description of which method(s) it can follow and any metainformation required in the response. (1 Reply)
Discussion started by: Neo
1 Replies

9. Shell Programming and Scripting

awk script to find time difference between HTTP PUT and HTTP DELETE requests in access.log

Hi, I'm trying to write a script to determine the time gap between HTTP PUT and HTTP DELETE requests in the HTTP Servers access log. Normally client will do HTTP PUT to push content e.g. file_1.txt and 21 seconds later it will do HTTP DELETE, but sometimes the time varies causing some issues... (3 Replies)
Discussion started by: Juha
3 Replies
IPTABLES-RESTORE(8)                                               iptables 1.6.1                                               IPTABLES-RESTORE(8)

NAME
iptables-restore -- Restore IP Tables ip6tables-restore -- Restore IPv6 Tables SYNOPSIS
iptables-restore [-chntv] [-M modprobe] [-T name] [file] ip6tables-restore [-chntv] [-M modprobe] [-T name] [file] DESCRIPTION
iptables-restore and ip6tables-restore are used to restore IP and IPv6 Tables from data specified on STDIN or in file. Use I/O redirection provided by your shell to read from a file or specify file as an argument. -c, --counters restore the values of all packet and byte counters -h, --help Print a short option summary. -n, --noflush don't flush the previous contents of the table. If not specified, both commands flush (delete) all previous contents of the respec- tive table. -t, --test Only parse and construct the ruleset, but do not commit it. -v, --verbose Print additional debug info during ruleset processing. -M, --modprobe modprobe_program Specify the path to the modprobe program. By default, iptables-restore will inspect /proc/sys/kernel/modprobe to determine the exe- cutable's path. -T, --table name Restore only the named table even if the input stream contains other ones. BUGS
None known as of iptables-1.2.1 release AUTHORS
Harald Welte <laforge@gnumonks.org> wrote iptables-restore based on code from Rusty Russell. Andras Kis-Szabo <kisza@sch.bme.hu> contributed ip6tables-restore. SEE ALSO
iptables-apply(8),iptables-save(8), iptables(8) The iptables-HOWTO, which details more iptables usage, the NAT-HOWTO, which details NAT, and the netfilter-hacking-HOWTO which details the internals. iptables 1.6.1 IPTABLES-RESTORE(8)
All times are GMT -4. The time now is 01:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy