I'm trying to access to my linux server using the hostname of the machine. I am using Windows and samba. I access through ip regularly but with the hostname, connection fails. What could it be?
This is my simple firewall:
Code: Select all
IPT=/usr/sbin/iptables
$IPT -t filter -F
$IPT -t filter -X
$IPT -t filter -Z
$IPT -t filter -P INPUT DROP
$IPT -t filter -P FORWARD DROP
$IPT -t filter -P OUTPUT DROP
/bin/echo "1" > /proc/sys/net/ipv4/ip_forward
/bin/echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
/bin/echo "1" > /proc/sys/net/ipv4/conf/all/rp_filter
/bin/echo "0" > /proc/sys/net/ipv4/conf/all/accept_redirects
/bin/echo "1" > /proc/sys/net/ipv4/icmp_ignore_bogus_error_responses
/bin/echo "1" > /proc/sys/net/ipv4/conf/all/log_martians
/bin/echo '1' > /proc/sys/net/ipv4/tcp_syncookies
/bin/echo '0' > /proc/sys/net/ipv4/conf/all/accept_source_route
$IPT -t filter -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPT -t filter -A OUTPUT -m state --state ESTABLISHED,RELATED,NEW -j ACCEPT
$IPT -t filter -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
#SAMBA
$IPT -t filter -A INPUT -p tcp --dport 139 -j ACCEPT
$IPT -t filter -A INPUT -p tcp --dport 445 -j ACCEPT