Find the answer to your Linux question:
Results 1 to 3 of 3
Hello. I have searched along google but this thing looks really chaotic. I just want to redirect some outgoing urls (like torrent sites for example) to a default page, for ...
  1. #1
    Just Joined! denniux's Avatar
    Join Date
    Jun 2009
    Posts
    4

    Redirect urls with IPtables

    Hello.
    I have searched along google but this thing looks really chaotic.

    I just want to redirect some outgoing urls (like torrent sites for example) to a default page, for example 127.0.0.1/deny.html I would like to do it via iptables, no proxy servers or software. Is that possible?

    I have managed to make all outgoing connections to one ip to be dropped by iptables with the command:

    ipatbles -A OUTPUT -d [IP] -j DROP

    But when i type a url instead of [IP], the iptables converts to ip automatically.
    Also i coundn't get redirection working.

    Thanks,
    Dennis

  2. #2
    Linux Newbie rituraj.goswami's Avatar
    Join Date
    Aug 2008
    Location
    Guwahati
    Posts
    133
    why don't you use a proxy server instead????
    There is nothing impossible, for everything is possible; the impossible only takes a bit longer than the possible.

  3. #3
    Linux Newbie
    Join Date
    Sep 2004
    Location
    UK
    Posts
    160
    You cant't do url's, iptables deals with tcp/udp not urls ( I could be wrong ) (eg www.yahoo.com/somaphe.html). like rituraj you need to use a proxy server.
    In a world without walls and fences, who needs Windows and Gates?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...