Results 1 to 7 of 7
Hi All,
I was wondering if it was possible to route packets coming in my eth0 interface to the lo interface. I'm trying to send traffic destined for the 10.10.10.0 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 11-19-2007 #1Just Joined!
- Join Date
- Nov 2007
- Posts
- 4
route eth0 -> lo
Hi All,
I was wondering if it was possible to route packets coming in my eth0 interface to the lo interface. I'm trying to send traffic destined for the 10.10.10.0 network, of which my eth0 is a part of, to a server service running on my local loopback. Is this possible? If so how?
- 11-19-2007 #2
Yes, you can do this.
For example would redirect all packets entering your box with port 80 to the internal service at port 8080Code:iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080
REDIRECT is the command in IPTABLES you want to use to keep traffic on the box it is entering.
- 11-19-2007 #3
Why not just configure the service to listen on eth0?
- 11-21-2007 #4Just Joined!
- Join Date
- Nov 2007
- Posts
- 4
heya Lazydog,
Thnks a lot for the nudge. Appreciate it
- 11-21-2007 #5Just Joined!
- Join Date
- Nov 2007
- Posts
- 4
yea i could run as so, rcgreen, but i'm learning to play with iptables so wanted to settle a curious itch. Thanx for the suggestion though.
- 11-21-2007 #6Just Joined!
- Join Date
- Nov 2007
- Posts
- 4
Hi again,
To try and test the redirect target i did the following. I ran a jabber server serving on lo port 5222. Then i configured kopete on my same very host to seek the server on eth0 port 5222. I then inserted the aforementioned iptable rule with adjustment to the port values. But i couldn't connect. My tables have no other rules except for the one i mentioned. Help.
- 11-21-2007 #7
You have to apps listening on the same port. Not good fix this


Reply With Quote
