LinuxQuestions.org
Help answer threads with 0 replies.
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-25-2006, 05:18 PM   #1
GGery
LQ Newbie
 
Registered: Mar 2006
Location: East Europe
Distribution: debian ubuntu freebsd
Posts: 14

Rep: Reputation: 0
Talking Iptables routing problem


Hello All

First sorry for my english condition.

I have Satellite internet in debian box.
Everything works fine (in local area)
I want to make router to my home network on this PC.

dvb interface for download
ppp0 for upload
and local proxy client (from my provider) arrange this together. This works only with two local ports 9202 and 9203.

Some people tell me to use Squid server,some to use iptables rules.
But how!!!!

Best Regards
GG
 
Old 03-26-2006, 11:23 AM   #2
KneeLess
Member
 
Registered: May 2003
Distribution: Debian GNU/Linux 3.0 Sid, OpenBSD 3.5
Posts: 190

Rep: Reputation: 30
It seems you want to make your Debian box the gateway to your uplink. You need network address translation then. Try this link. If that's not what you want, ask again.
 
Old 03-27-2006, 01:05 AM   #3
GGery
LQ Newbie
 
Registered: Mar 2006
Location: East Europe
Distribution: debian ubuntu freebsd
Posts: 14

Original Poster
Rep: Reputation: 0
Talking

Thanks KneeLess

I have already NAT rule
Quote:
/sbin/iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
But the problem is how to make redirect request for url (for example google)
from host in home network to localhost proxy client ( in "server") and how to redirect the answer to that host.
The answer comes from dvb interface...

BR
 
Old 03-27-2006, 06:32 AM   #4
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally Posted by GGery
how to make redirect request for url (for example google)
from host in home network to localhost proxy client
like this:
Code:
iptables -t nat -A PREROUTING -p TCP -i $LAN_IFACE --dport 80 \
-j REDIRECT --to-port 3128
this changes outgoing (from LAN to WAN) HTTP packets in such a way that they no longer get forwarded, but instead go into the INPUT chain on the proxy... this is part of what's called transparent proxying, and it sounds like that's what you are looking for, although i'm not sure... you'd also need to tell squid to run in transparent mode by putting these lines in your squid.conf:
Code:
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
http://www.google.com/search?&q=squid+transparent+proxy

just my ...
 
Old 03-28-2006, 01:49 AM   #5
GGery
LQ Newbie
 
Registered: Mar 2006
Location: East Europe
Distribution: debian ubuntu freebsd
Posts: 14

Original Poster
Rep: Reputation: 0
Thanks win32sux

A don't have squid server. I have only proxy client for user authentication in satellite platform and for arrange this "hybrid" internet.
I still don't know "how to redirect the answer to lan host,that host who requested url

Thanks
GG
 
  


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
iptables 1 to 1 DNAT routing problem MarleyGPN Linux - Networking 3 12-13-2005 04:24 PM
iptables/routing problem Mephisto123 Linux - Networking 1 07-18-2005 07:50 AM
iptables routing CJ_Grobler Linux - Security 1 06-14-2005 02:13 AM
Routing and IPtables problem RajaRC Linux - Networking 10 01-10-2005 07:17 AM
iptables / routing hakcenter Linux - Networking 13 05-01-2003 04:16 AM

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

All times are GMT -5. The time now is 08:22 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