Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
squid + packet marking
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
johnlehardos
n00b
n00b


Joined: 16 Mar 2005
Posts: 29

PostPosted: Tue Apr 26, 2005 10:10 am    Post subject: squid + packet marking Reply with quote

Hi,
I have a problem with my firewall, proxy configuration.
The server has two internet connections on two interfaces (ppp0 and eth0) and the lan is connected on eth1.
I have been using iptables with packet marking to route http protocol via ppp0 and other protocols via ppp0.
Everything was functionning successfully.

Now I have installed a squid on this server, with a NAT redirecting port 80 to port 3128.

Code:

$iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 3128


From now it seems that the packet marking doesn't work, packets 80 are going to ppp0 or eth0 and they are often lost, browser indicating "waiting ...".

thank for helping me, i'm getting crazy about it.
PS : sorry for my poor english
Back to top
View user's profile Send private message
RItalMan
n00b
n00b


Joined: 06 Jan 2005
Posts: 27
Location: France, Nantes

PostPosted: Tue Apr 26, 2005 12:12 pm    Post subject: Reply with quote

Hi,

Maybe you should add the network source in the rule, I mean for instance :

Code:

iptables -t nat -A PREROUTING -s 192.168.0.0/255.255.255.0 -p tcp -m tcp --dport 80 -j DNAT --to-destination <IP address of the proxy>:3128


For a 3 "ways" router, using the DNAT should work far better than the simple --to-destination rule.

Hope this helps ;)
_________________
Décidémment tu n'es vraiment pas très sympa, mais le train de tes injures roule sur les rails de mon indifférence et j'aime mieux partir plutôt que d'entendre çà plutôt que d'être sourd !
Back to top
View user's profile Send private message
johnlehardos
n00b
n00b


Joined: 16 Mar 2005
Posts: 29

PostPosted: Tue Apr 26, 2005 12:49 pm    Post subject: Reply with quote

je vais parler français parce que je suis meilleur que en anglais.

J'ai essayé ta solution, mais ca ne marche pas mieux, en fait c pire ... aucunes requetes http n'aboutie, un peu comme si iptables les bloquait. pourtant pour les tests il est en ACCEPT par defaut.

mon probleme est en fait que la route par defaut est choisie aleatoirement (on dirait ...) depuis que j'ai mis squid. Sans squid, la table de routage appropriée à mes paquets est bien utilisée.
pourkoi squid me chamboulerais tout ça??? Le marquage des paquets et la redirection sur le port 3128 sont fait en PREROUTING, ca ne pose pas de probleme, l'un avec l'autre ?
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Tue Apr 26, 2005 1:30 pm    Post subject: Reply with quote

Don't do that.

Move it to French if you must - these forums are meant for English, please respect that.
_________________
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum