I'm running a server with FreeBSD and I'm trying to make it use 192.168.1.140 whenever I'm connecting to my router (WRT54GL). When I'm using DHCP, it can assign a new ip when I restart, and then I'd have to change port numbers in port forwarding. In an attempt to fix this, I changed
to
j
in /etc/rc.conf.
I setup port forwarding for ssh (on port 21330) to go to 192.168.140 on my router, however I can't login remotely anymore. When I try to ssh in it just hangs without any error output.
Here is what sockstat -4 outputs
The local address doesn't match the foreign address. Also I can't log into mysql remotely either. Any help would be appreciated. Thanks for reading.
Code:
ifconfig_em0="DHCP"
to
Code:
ifconfig_em0="inet 192.168.1.140 netmask 255.255.255.0"
in /etc/rc.conf.
I setup port forwarding for ssh (on port 21330) to go to 192.168.140 on my router, however I can't login remotely anymore. When I try to ssh in it just hangs without any error output.
Here is what sockstat -4 outputs
Code:
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS
root sshd 5221 3 tcp4 192.168.1.140:21330 192.168.1.108:62433
root sshd 5177 4 tcp4 *:21337 *:*
root smbd 2071 20 tcp4 *:445 *:*
root smbd 2071 21 tcp4 *:139 *:*
root nmbd 2065 6 udp4 *:137 *:*
root nmbd 2065 7 udp4 *:138 *:*
root nmbd 2065 8 udp4 192.168.1.140:137 *:*
The local address doesn't match the foreign address. Also I can't log into mysql remotely either. Any help would be appreciated. Thanks for reading.