hi, I have installed a printer on an ethernet network branch, and the token ring part of the network doesn't see it, nor can ping it... this is correct.... so I have a gateway that is in between and forward from one branch to another... still the printer cannot be seen... so i'd like to nat the eth ip adress of the printer to the token part of the network, so people can use this printer.... i added this line so far ipchains -A forward -j MASQ -s my.printer.tr.addr/32 -d my.printer.eth.addr/32 but this doesn't seem to be enough... i've seen these lines for iptables iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to my.printer.eth.addr iptables -t nat -A PREROUTING -i tr01 -j DNAT --to my.printer.tr.addr but i haven't found out how to translate them to ipchains.... anybody has a clue ?... stephane
stephane parenton a écrit :
hi,
I have installed a printer on an ethernet network branch, and the token ring part of the network doesn't see it, nor can ping it... this is correct.... so I have a gateway that is in between and forward from one branch to another... still the printer cannot be seen... so i'd like to nat the eth ip adress of the printer to the token part of the network, so people can use this printer....
i added this line so far
ipchains -A forward -j MASQ -s my.printer.tr.addr/32 -d my.printer.eth.addr/32
but this doesn't seem to be enough...
i've seen these lines for iptables
iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to my.printer.eth.addr iptables -t nat -A PREROUTING -i tr01 -j DNAT --to my.printer.tr.addr
but i haven't found out how to translate them to ipchains....
I also tested this : ip route add nat ext_addr via int_addr but it didn't work either....
On Wednesday 17 October 2001 10:15 am, stephane parenton wrote:
stephane parenton a écrit :
I also tested this :
ip route add nat ext_addr via int_addr
but it didn't work either....
You have IP forwarding switched on? Check with cat /proc/sys/net/ipv4/ip_forward set with echo "1" > /proc/sys/net/ipv4/ip_forward And do the other hosts know that the Ethernet side of your Linux machine is a gateway to the one-node subnet on the Token Ring side? -- -----------------------+------------------------------------------------------ Scott Courtney | "I don't mind Microsoft making money. I mind them courtney@4th.com | having a bad operating system." -- Linus Torvalds http://www.4th.com/ | ("The Rebel Code," NY Times, 21 February 1999)
Scott Courtney a écrit :
ip route add nat ext_addr via int_addr
You have IP forwarding switched on?
Check with
cat /proc/sys/net/ipv4/ip_forward
yes it is. the gateway runs for months now, and i just added a printer on the ethernet side. I want the printer to have an ip adress on both sides of the network.
And do the other hosts know that the Ethernet side of your Linux machine is a gateway to the one-node subnet on the Token Ring side?
Well the hosts on the ethernet side have the eth0 adress as a gateway, but the token ring don't have the gateway. despite this i'm questionning myself about the command because i can ping the printer from the gateway itself with its eth adress, but not with its token adress declared with the "ip route add nat"... stephane
On Thursday 18 October 2001 03:46 am, stephane parenton wrote:
And do the other hosts know that the Ethernet side of your Linux machine is a gateway to the one-node subnet on the Token Ring side?
Well the hosts on the ethernet side have the eth0 adress as a gateway, but the token ring don't have the gateway.
This may actually be your problem. I believe you will find that the T/R device needs to think of the T/R side of the Linux machine as its default gateway, or at least as a gateway to the appropriate subnet. -- -----------------------+------------------------------------------------------ Scott Courtney | "I don't mind Microsoft making money. I mind them courtney@4th.com | having a bad operating system." -- Linus Torvalds http://www.4th.com/ | ("The Rebel Code," NY Times, 21 February 1999)
participants (2)
-
Scott Courtney
-
stephane parenton