LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 09-22-2005, 07:50 PM   #1
hypexr
Member
 
Registered: Oct 2003
Location: USA Fresno Callifornia
Distribution: Gentoo (workstation), ArchLinux (file/mail server), Freebsd (web server), Ubuntu (laptop)
Posts: 115

Rep: Reputation: 16
sending out going traffic to the loopback interface with iptables


I am not very good with iptables rules and have been searching and reading for days trying to figure this out.

I want set a rule that will send all packets that are being sent out through eth0 to 127.0.0.1 or lo. From what I've read I may be able to do this with nat by using iptables to change the destination address.

Two rules I've tried are:

iptables -t nat -A PREROUTING -i eth0 -j DNAT --to-destination 127.0.0.1
iptables -t nat -A OUTPUT -j DNAT --to-destination 127.0.0.1

These did not work correctly. Do they make any sense.
 
Old 09-22-2005, 08:36 PM   #2
hypexr
Member
 
Registered: Oct 2003
Location: USA Fresno Callifornia
Distribution: Gentoo (workstation), ArchLinux (file/mail server), Freebsd (web server), Ubuntu (laptop)
Posts: 115

Original Poster
Rep: Reputation: 16
Nevermind, I believe that the -A OUTPUT rule does work for sending all traffice to 127.0.0.1
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Truecrypt problem. No available loopback interface white scorpion Linux - Security 4 11-28-2005 08:33 AM
Using loopback interface... ozymandias Linux - Newbie 2 10-28-2005 02:37 PM
Loopback Interface in a router theneb Linux - Networking 1 01-16-2005 03:03 AM
error on boot up: Bringing up loopback interface glorygirl Linux - Networking 2 01-18-2004 11:11 PM
Bringing up loopback interface pollycat Linux - Networking 49 09-07-2003 03:07 PM


All times are GMT -5. The time now is 06:19 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration