LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-19-2011, 09:17 AM   #1
eaglefly
LQ Newbie
 
Registered: Sep 2011
Posts: 4

Rep: Reputation: Disabled
Forwarding traffic to another machine


Hey,

I've got small networking problem connected with forwarding traffic. My network looks like this: I have two computers. "A" computer has not access to the Internet. "B" computer has access to the Internet. "A" computer can ping "B".

I want to use Internet from computer "B" on computer "A". How can I do it? Especially it is going me to using services on ports 22, 80, 443. I would be really grateful if you could solve my problem.
 
Old 09-19-2011, 09:45 AM   #2
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Doesn't understand you much, but do you want something like this (to clarify what you want)?
1.
NOW do you have situation like this:
Code:
          internet
      /           \
Comp A.         Comp B[/quote]
and you want this:
Code:
            internet
                 |
Comp A. ---> Comp B.
or what?

2. What OS your computers run (Windows, Linux ...) ?

3. what type of internet connection you have (DSL broadband with router and both computers connected to router ?)

Clarify what you want and someone may provide you help.

good luck.

Last edited by lithos; 09-19-2011 at 09:47 AM.
 
Old 09-19-2011, 10:00 AM   #3
eaglefly
LQ Newbie
 
Registered: Sep 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
Now I have situation like this. It's physical network connection:

Code:
     
          internet
        /          \
Comp A.   ___     Comp B
I would like to make sth like this:

Code:
     
              SSH server
                   |
               Internet
                   |
                   | 
Comp. A  ---->  Comp. B
-Comp. B should be like a router in this situation.
-OS (on all machines): Linux OpenSuSE 11,
-Comp. A and Comp. B are connected to the router, which has static ip address (but I want to move all traffic from computer A through computer B to router with Internet).

Last edited by eaglefly; 09-19-2011 at 10:04 AM.
 
Old 09-19-2011, 11:54 AM   #4
16pide
Member
 
Registered: Jan 2010
Posts: 418

Rep: Reputation: 83
ssh tunneling seems to be what you are looking for.
It is explained here: http://www.revsys.com/writings/quick...sh-tunnel.html

It's not clear to me why you want to do this since today you have it working form computer A to the Internet.

Do you want to filter what computer A does?
Do you want to spy what computer A does?
Do you want to free a network port on a switch?
etc ...
 
Old 09-19-2011, 02:55 PM   #5
eaglefly
LQ Newbie
 
Registered: Sep 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
Yes, I have the Internet connection in computer "A" but router doesn't allow computer "A" to connect to external services (like WWW, SSH, FTP etc.). Thanks for your advice connected with SSH tunneling, but I'm looking for more constant, stable solution. I've read a little about routing packets but I don't know how to introduce this solution (my knowledge about netwokring is really small and I have task connected with them in my work). I don't have possibility to change firewall rules on router. I would be grateful for giving me more solutions for my problem.

Last edited by eaglefly; 09-19-2011 at 03:15 PM.
 
Old 09-19-2011, 03:17 PM   #6
cendryon
Member
 
Registered: Aug 2005
Location: France
Distribution: Slackware64 current
Posts: 82

Rep: Reputation: 30
Hi

What you want is using B as a router for A.

If B is running any kind of Linux distribution, and if you have root access on B, look for howtos about NAT-Masquerading.

If available to your distribution, you can even use firewall building utilities such as FireHOL or ShoreWall.

Cheers
 
Old 09-19-2011, 03:33 PM   #7
eaglefly
LQ Newbie
 
Registered: Sep 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thanks for your fast reply. I thought about NAT MASQR. You reassured me that it's good solution. It's advance activity for me and I'll hope that I'll be able to do this. It's possible that I'll write here in nearest time to ask for help with NAT MASQR.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] forwarding all internet traffic through proxy BHABANIPRASADPATI Linux - Networking 2 07-20-2011 11:20 AM
UPnP not working after traffic forwarding through server blither Linux - Networking 2 12-31-2010 01:16 PM
TCP traffic forwarding shathil Linux - Networking 1 09-05-2009 11:46 PM
Forwarding traffic between 2 NICs! muzzamil.luqman Linux - Networking 4 12-08-2005 06:18 PM
Wireless traffic stomps isdn traffic on gateway machine Radix999 Linux - Wireless Networking 0 11-14-2003 01:54 AM

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

All times are GMT -5. The time now is 10:40 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration