LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 03-19-2013, 04:26 AM   #1
KatrinAlec
Member
 
Registered: Feb 2012
Posts: 116

Rep: Reputation: 13
iptables localhost


I've looked at iptables and loads of entries show localhost instead of the ip-address.
But they're not local.

They're not in any of the interfaces not are they in /etc/hosts.

Which other possibilities are there?
 
Old 03-19-2013, 09:16 PM   #2
KinnowGrower
Member
 
Registered: May 2008
Location: Toronto
Distribution: Centos && Debian
Posts: 347

Rep: Reputation: 34
Can you show some output as an example?
 
Old 03-20-2013, 05:13 AM   #3
KatrinAlec
Member
 
Registered: Feb 2012
Posts: 116

Original Poster
Rep: Reputation: 13
here a bit of iptables output without -n

Code:
Chain FORWARD (policy DROP 75 packets, 3744 bytes)
 pkts bytes target     prot opt in     out     source               destination         
 425M   41G ACCEPT     all  --  any    any     anywhere             anywhere            state RELATED,ESTABLISHED 
    0     0 DROP       all  --  any    gre+    anywhere            !localhost/8         
  216 90685 DROP       all  --  gre+   any    !localhost/8          anywhere            
1547K   59M ACCEPT     icmp --  any    any     localhost            anywhere            
 562K   25M ACCEPT     tcp  --  any    any     localhost            anywhere            tcp dpt:9010 
 4454  199K ACCEPT     all  --  any    any     localhost            anywhere            
    3   144 ACCEPT     all  --  any    any     localhost            anywhere            
    0     0 ACCEPT     all  --  any    any     localhost/29         anywhere            
   14   672 ACCEPT     all  --  any    any     localhost/24         anywhere            
    0     0 ACCEPT     all  --  any    any     localhost/24         anywhere            
    1    48 ACCEPT     all  --  any    any     localhost/24         anywhere            
    0     0 ACCEPT     all  --  any    any     localhost/24         anywhere            
    3   144 ACCEPT     all  --  any    any     localhost/24         anywhere            
    0     0 ACCEPT     all  --  any    any     localhost/24         anywhere            
    0     0 ACCEPT     all  --  any    any     localhost/24         anywhere
That what is labeled localhost isn't local.
If one uses -n it shows the correct 10.x.x.x addresses from our network.
I don't have a clue why it would think those addresses are localhost.
 
Old 03-21-2013, 09:04 PM   #4
KinnowGrower
Member
 
Registered: May 2008
Location: Toronto
Distribution: Centos && Debian
Posts: 347

Rep: Reputation: 34
What happen if you run ping localhost?. Means what ip you got by resolving localhost?
 
Old 03-22-2013, 03:27 AM   #5
KatrinAlec
Member
 
Registered: Feb 2012
Posts: 116

Original Poster
Rep: Reputation: 13
ping localhost is answered from 127.0.0.1

in /etc/hosts is only 127.0.0.1 as localhost
and 127.0.0.2 and as C2000.local
 
  


Reply



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
how to deny all traffic with iptables except localhost BlackHawk Linux - Security 9 05-15-2011 08:19 AM
PowerDNS /localhost recursion/cache/iptables peace18 Linux - Newbie 1 03-09-2011 10:32 AM
IPTABLES bounce outbound IP back to localhost clunk Linux - Networking 2 10-05-2009 02:19 AM
Can't enable transparent squid on localhost using iptables. bubnoff Linux - Newbie 2 07-02-2009 02:45 PM
Bind Iptables can't access out of localhost wspivak Linux - Server 4 03-26-2008 08:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:48 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration