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 11-22-2006, 03:07 AM   #16
karelvdm
Member
 
Registered: Sep 2004
Location: Pietermaritzburg South Africa
Distribution: Home:OpenSuse 11, Office:FreeBSD 7 PBX:Trixbox 2 (CentOS 4.4) Home Automation : LinuxMCE
Posts: 123

Original Poster
Rep: Reputation: 15

Amitsharma spoke about "port-forwarding with PREROUTING+POSTROUTING"
If I could give that a try?
What would the commands look like?
The setup;
Freebsd box
rl0 is the lan NIC with ip 192.168.45.146
rl1 is the wan NIC with ip 10.0.0.1 , but the ip I use to connect to the freebsd box
is 41.241.*.* (via adsl).
Connect to freebsd box via port 4899 and gets forwarded to the unix server;
ip 192.168.45.1 on port 23.
The unix server's gateway is their satelcom router's ip; 192.168.45.10.

Last edited by karelvdm; 11-22-2006 at 03:18 AM.
 
Old 11-24-2006, 11:05 AM   #17
amitsharma_26
Member
 
Registered: Sep 2005
Location: New delhi
Distribution: RHEL 3.0/4.0
Posts: 777

Rep: Reputation: 31
Hi again dear, (sorry for delayed reply)
You know what; it seems as these both boxes(192.168.45.1 & *.146) fall under a same LAN; unix server having some other default gateway would'nt stand for much problem i think.(i am still not sure because of non-availabilty of routing tables of 192.168.45.1 box)

Anwyays you can try out these below mentioned PRE-ROUTING + POSTROUTING commands. And karelvdm; as i am also not sure whether your adsl modem is being forwarding those 41.241.*.* packets to your box 10.0.0.1 ethernet or is it doing NATing, so in the first below mentioned PREROUTING rule, if it doesnt work, you should change the -d 41.241.*.* to -d 10.0.0.1

Code:
iptables -t nat -A PREROUTING -d 41.241.*.* -p tcp --dport 4899 -j DNAT --to 192.168.45.1:23
&
Code:
iptables -t nat -A POSTROUTING -d 192.168.45.1 -j SNAT --to 192.168.45.146
Lets hope that it will work your problem out.
 
Old 11-27-2006, 03:38 AM   #18
karelvdm
Member
 
Registered: Sep 2004
Location: Pietermaritzburg South Africa
Distribution: Home:OpenSuse 11, Office:FreeBSD 7 PBX:Trixbox 2 (CentOS 4.4) Home Automation : LinuxMCE
Posts: 123

Original Poster
Rep: Reputation: 15
Hey Amitsharma

When trying:
iptables -t nat -A PREROUTING -d 10.0.0.1 -p tcp --dport 4899 -j DNAT --to 192.168.45.1:23

I get
"iptables: Command not found"

Last edited by karelvdm; 11-27-2006 at 03:39 AM.
 
Old 11-27-2006, 05:51 AM   #19
amitsharma_26
Member
 
Registered: Sep 2005
Location: New delhi
Distribution: RHEL 3.0/4.0
Posts: 777

Rep: Reputation: 31
Quote:
Originally Posted by karelvdm
I get
"iptables: Command not found"
It seems that either iptables is not installed or the path variable has not been updated for an alternate location installation.

Like the way we have
Code:
rpm -qi iptables
for telling whether queried application is installed or not in REDHAT (afaik), you must be having some way to check this at your SLED10 distro as well.

Why dont you install iptables either downloading from its website or from the cds of your distro.
 
Old 11-27-2006, 08:35 AM   #20
karelvdm
Member
 
Registered: Sep 2004
Location: Pietermaritzburg South Africa
Distribution: Home:OpenSuse 11, Office:FreeBSD 7 PBX:Trixbox 2 (CentOS 4.4) Home Automation : LinuxMCE
Posts: 123

Original Poster
Rep: Reputation: 15
Hey Amitsharma,

My FreeBSD 6.1 box doesn't use iptables, it usses ipfw.
Browsing through the FreeBSD forums to find out what the commands would be
for my scenario.

I'll let U know how it goes.
Thanx a mil for the help so far!!!!!

Last edited by karelvdm; 11-27-2006 at 08:37 AM.
 
Old 11-28-2006, 09:19 AM   #21
karelvdm
Member
 
Registered: Sep 2004
Location: Pietermaritzburg South Africa
Distribution: Home:OpenSuse 11, Office:FreeBSD 7 PBX:Trixbox 2 (CentOS 4.4) Home Automation : LinuxMCE
Posts: 123

Original Poster
Rep: Reputation: 15
Hey Amitsharma,

Might be able to get it to work.......
Connect via a vpn connection to the freebsd box with user authentication,
then telnet to the server(192.168.45.1).
The client access software that the cleint uses creates a telnet session.
Busy setting up the vpn connection. Let U know how it goes!
 
Old 11-28-2006, 09:43 AM   #22
amitsharma_26
Member
 
Registered: Sep 2005
Location: New delhi
Distribution: RHEL 3.0/4.0
Posts: 777

Rep: Reputation: 31
I like ya sign, it tells me about ya attitude. It seems you are doing the job same way you have mentioned; Trial & ERROR & keeeeep trying until you get the results.

Karelvdm, You are doing a good job. Keep it UP & yea stay me updated.
 
Old 12-01-2006, 12:06 AM   #23
karelvdm
Member
 
Registered: Sep 2004
Location: Pietermaritzburg South Africa
Distribution: Home:OpenSuse 11, Office:FreeBSD 7 PBX:Trixbox 2 (CentOS 4.4) Home Automation : LinuxMCE
Posts: 123

Original Poster
Rep: Reputation: 15
Amitsharma

Been a bit busy lately.....

It works!!!!!!!
Now I want to set up a Suse box with VPN.
I prefer Linux to FreeBSD.
My boss has a friend that is a guru on FreeBSD, he greated the vpn the FreeBSD box after I pointed them into the right direction, but they don't want to show me how, so now I'm gonna setup my Suse box and show them......after I'm finished with my Trixbox.
 
  


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
IPCHAINS port forwarding and IPTABLES port forwarding ediestajr Linux - Networking 26 01-14-2007 07:35 PM
Simple Port Forwarding Firewall - not forwarding MadTurki Linux - Security 14 04-09-2006 12:08 PM
Port 80 forwarding to port 22 with iptables zahoo Linux - Networking 3 02-22-2005 07:22 AM
port forwarding and packet forwarding syrtsardo Linux - Newbie 2 07-03-2003 10:37 AM
port forwarding TimBeR Linux - Networking 1 10-12-2001 01:29 PM

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

All times are GMT -5. The time now is 08:37 AM.

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