LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 09-21-2003, 10:54 AM   #1
chatmanpk
LQ Newbie
 
Registered: Sep 2003
Distribution: RH 6.0 to 9.0 Mandrake 9.0 Solaris 5.7 Win 2k, Win 3k, Gentoo
Posts: 2

Rep: Reputation: 0
Sharing internet connection with iptables


I am on a wide campus network and network administrator of my hostel. Hostel server is running RH 7.3. Now the problem is that there is a senior student in my hostel who has been provided access to a proxy server, say 192.168.1.1 ... which lays far away across a number of hops...
I tried to SNAT on hostel server using
iptables -t nat -A POSTROUTING -s <myIP> -d 192.168.1.1 -j SNAT --to-source <senior'sIP>
Now i was connected to the proxy but the senior was no longer connected. Is there anyway that we both can use his connection???
Don't tell me to run proxy on senior's pc... I don't want the senior to know that i am using his connection... Just tell me something that i related only and only to my hostel's server...

Jaffar
 
Old 09-21-2003, 11:50 AM   #2
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
All you need to do is add a static route in your pc (or the hostel server) to the proxy so your networking can find it.
If there are multiple hops, you will need multiple entries to define each net between...

Last edited by peter_robb; 09-21-2003 at 11:53 AM.
 
Old 09-27-2003, 05:30 PM   #3
chatmanpk
LQ Newbie
 
Registered: Sep 2003
Distribution: RH 6.0 to 9.0 Mandrake 9.0 Solaris 5.7 Win 2k, Win 3k, Gentoo
Posts: 2

Original Poster
Rep: Reputation: 0
Okayyyy....
Now let me put this in a more explicit way...
Its not about routing. The squid on proxy server allows only a few IPs to connect to internet through it...
Now when i used
iptables -t nat -A POSTROUTING -s <myIP> -d 192.168.1.1 -j SNAT --to-source <senior'sIP>
i got through the proxy server, but the senior got reject from proxy..
The question is: how can i manage to get through the proxy in a way that my outgoing packets have the senior's IP as source IP... and still senior is not knocked off the server...
 
  


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
Problems with iptables not allowing internet sharing. ryedunn Linux - Networking 19 02-10-2005 07:23 PM
Internet Sharing with iptables? can it be done? sitmex Linux - Networking 3 03-09-2004 04:25 PM
iptables fwding for internet sharing help seth Linux - Networking 3 08-20-2003 11:29 AM
idea: sharing net connection, method: iptables..., problem: broken net connection :( danny2055 Linux - Networking 4 06-09-2003 07:00 AM
Internet connection sharing with iptables specialmunky Linux - Newbie 10 10-29-2002 01:10 PM

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

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