Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: RH 6.0 to 9.0 Mandrake 9.0 Solaris 5.7 Win 2k, Win 3k, Gentoo
Posts: 2
Rep:
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...
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.
Distribution: RH 6.0 to 9.0 Mandrake 9.0 Solaris 5.7 Win 2k, Win 3k, Gentoo
Posts: 2
Original Poster
Rep:
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...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.