I set up an OpenVPN server in bridged mode - using tap0 - and client
both running CentOS 4.4. The VPN works perfectly, except for printing
from the client LAN - 10.1.2.x/24 to the server LAN - 10.1.1.x/24. I am
using a HP 1320n network printer with IP 10.1.1.100 on the server side.
I can telnet to the printer's port 80 from anywhere in the client LAN
without a problem. However, trying to telnet to port 9100 results in a
connection refused error. If I telnet the printer's port 9100 from the
client side VPN server, it connects without a problem. My vpn iptables
rules on both sides look like this:
iptables -A INPUT -p udp --dport 1194 -j ACCEPT
iptables -A INPUT -i tun+ -j ACCEPT
iptables -A OUTPUT -o tun+ -j ACCEPT
iptables -A FORWARD -i tun+ -j ACCEPT
iptables -A FORWARD -o tun+ -j ACCEPT
iptables -A INPUT -i tap+ -j ACCEPT
iptables -A OUTPUT -o tap+ -j ACCEPT
iptables -A FORWARD -i tap+ -j ACCEPT
iptables -A FORWARD -o tap+ -j ACCEPT
iptables -A FORWARD -p 50 -j ACCEPT
iptables -A FORWARD -p 51 -j ACCEPT
iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE
iptables -t nat -A POSTROUTING -o tap0 -j MASQUERADE
Any ideas on how to fix this?
Software/Hardware used: CentOS Linux OpenVPN IPTABLES HP1320n
Could it be some "scope restriction" in the hp1320 printserver itself? It has access control, btw.
Telnet to the default telnet port 23 and get a look at menu/TCPIP(2)/access_control(4)
BR,
Petko A.
There are no restrictions in place. My aim is to replace the current leased line between the two premises with the VPN connection. The VPN server IP address is 10.1.1.50 and the leased line node is 10.1.1.51. The VPN client IP address is 10.1.2.250 and the client leased line node is 10.1.2.251. If I change the routing on the workstation on the client side to connect to the printer on 10.1.1.100 through 10.1.2.251, I can telnet to port 9100 on the printer and print no problem. The moment I change it to 10.1.2.250, it refuses connection. The default gateway on the printer is set to 10.1.1.50. I tried changing that too, but still the same problem. This leads me to believe that the linux vpn box is somehow blocking this port. Why am I able to telnet to port 80 on the printer, but not port 9100, no matter what the gateway?
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!
Discuss This Question: 2  Replies